ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Performance: which is best?

November 28, 2007 4:01pm

Subscribe [2]
  • #1 / Nov 28, 2007 4:01pm

    lithiumdave

    215 posts

    I sometimes find myself repeating the same weblog:entries tag, containing the same parameters, again and again down a template. Maybe once in the <head>, a few times in the body, etc.  Basically whenever I’m ‘finished’ with needing it till further on in the template.

    Now I’m thinking that I’d actually be better off in this case opening the weblog:entries tag near the top of the template, then closing it after the very last custom_field variable (of course if there are no other weblog:entries tags with different parameters inbetween?)

    Which is better performance-wise? One weblog:entries tag spanning the entire template, or a few which are closed as soon as they’re not needed?

    Thanks!  : )

  • #2 / Nov 28, 2007 4:04pm

    Derek Jones

    7561 posts

    If it’s a single entry template, then definitely just one tag.  This is impracticle on most multi-entry templates, as you will most likely end up repeating lots of markup that you don’t want to, such as sections of your <head>, the <body> tag, etc.

  • #3 / Nov 28, 2007 4:16pm

    lithiumdave

    215 posts

    Yes, definitely meant in single entry templates actually. Just becoming a little obsessed with page rendering times : )

    I’ve been optimising for speed more and more recently, particularly using the disable= parameter. Even better, I’ve also just started moving all my EE sites over to EngineHosting and my goodness are those sites flying now! A fantastic decision 😊

    Thanks for the advice Derek.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases