Michael Dinowitz wrote:

>I'm rewriting Raymond's Lighthouse Bugtracker (not my idea) and one piece
>bought up an old question I had. Is there any performance difference between
>a CFMODULE acting as a layout wrapper or 2 CFINCLUDE templates with layout?
>In the first case, your code is:
><cfmodule template="layout.cfm">
>Display stuff
></cfmodule>
>
>In the second  case you have:
><CFINCLUDE template="header">
>Display Stuff
><CFINCLUDE template="footer">
>
>Because of the nature of the CFMODULE, it's called twice and various
>variables are created in its process. The CFINCLUDE method uses 2
>CFINCLUDES, but there's nothing special about them. No extra variables, etc.
>
>Logic says that the CFINCLUDE method of template layout is more efficient,
>but I'd like to know what others think? 
>
>I'll ask the question about what people think of the pagecontext include vs.
>cfinclude another time. :)
>  
>
If I remember correctly, doesn't cfmodule create a whole new memory 
block for every call, where as the cfinclude will only use the existing 
memory space and be part of the normal page cache?

Even if this isn't true for CFMX any more, personally, I'd probably lean 
towards the cfinclude method, because
    a) thats what I'm used to,
    b) I find it visually easier to read
    c) I feel like can tinker with the header and footer dynamically 
with a cfinclude than a cfmodule.
and    d) Easier to get to the header and footers if I need to change 
them or simply replace them.

What goes on inside the the cfmodule?  Is the header and footer actually 
inside the cfmodule template or does it include the header and footer 
templates?  If it includes them, then it'd be a bit of a pointless call 
to the cfmodule, if its in the cfmodule template, then refer to my point 
(d) above. ;)

Stephen


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Special thanks to the CF Community Suite Silver Sponsor - New Atlanta
http://www.newatlanta.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:185701
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to