[thelist] CF: Tag to insert into body tag

Chris Evans chris at fuseware.com
Mon Mar 19 12:15:55 CST 2001


Use CFMODULE rather than CF_ for custom tags.  CF_ is easier, but it incurs
overhead as CF searches through the directories to find the tag. Using
CFINCLUDE is marginally faster, but breaks encapsulation of your modules.


Chris Evans
chris at fuseware.com
http://www.fuseware.com



-----Original Message-----
From: thelist-admin at lists.evolt.org
[mailto:thelist-admin at lists.evolt.org]On Behalf Of Joshua OIson
Sent: Monday, March 19, 2001 2:55 PM
To: thelist at lists.evolt.org
Subject: Re: [thelist] CF: Tag to insert into body tag


Raymond,

I've worked with jeff on testing the execution time for custom tags in a few
different versions of ColdFusion.  Our experience has shown that custom tags
seem to incur a pretty hefty speed penalty in execution time when compared
to strict cfincludes.

For example, we'd use a small tag to perform some task, say insert a
prefilled select box or something, and it would not be uncommon for that
custom tag, of remarkably few lines, to take a huge percentage of the
processing time.  Without the tag, the page may render in 60ms, but as soon
as you add a custom tag or two the page render time jumps to 120ms or more.
I'm open to the fact that we may simply be coding custom tags incorrectly.
Now, we use them rather sparingly, in cases where no other method really
accomplishes the same thing, or in processing pages that don't occur often
enough to appreciably hurt server performance.

Is there a definitive resource that can show us if we are simply doing
something wrong in coding or in server setup?

-joshua

You wrote:

> While I agree with the solution you provided, what do you mean by
> performance hit? Sure, more code equals more stuff to process equals more
> _time_ to process. Sure, a solution written in JavaScript will be faster,
> but you seem to be implying the custom tags in _general_ are bad for
> performance. This is not the case. Again - the same rule applies - more
code
> equals more processing time. But for 99% of the work you do, this will not
> matter, and the benefits of custom tags (code re-use and readability) far
> outweigh the cost to performance.
>
> p.s. If I read you wrong, just ignore me. ;)


---------------------------------------
For unsubscribe and other options, including
the Tip Harvester and archive of TheList go to:
http://lists.evolt.org Workers of the Web, evolt !






More information about the thelist mailing list