[thelist] CF: Tag to insert into body tag

Joshua OIson joshua at alphashop.net
Mon Mar 19 11:53:55 CST 2001


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?


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
> 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. ;)

More information about the thelist mailing list