> -----Original Message-----
> From: Barney Boisvert [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, January 18, 2006 5:18 PM
> To: CF-Talk
> Subject: Re: Significant Performance Hit on Recursive Custom Tags?
> 
> There is some overhead for making a custom tag call, so if you have
> recursion (or iteration) across a call, you'll have to pay that
> overhead each time.  I'd say it's nothing to worry about until you
> notice it as a problem when you're doing load testing.
> 
> If you're running on CFMX, however, I'd look into wrapping the
> functionality in a CFC or UDF instead of a custom tag though.
> Functions are better suited to recusion, if you ask me, and they're
> probably a bit more performant, but that's just a guess.

I agree with Barney here with one reminder: remember that you can put
functions inside custom tags.  Not many people seem to remember that.

I've found that most recursive tags could be remodeled quite easily with
internal recursive functions.  A function in a tag is contained within it -
there's no exposure to the rest of the template or really any downside that
I can see.

I've done no testing to back up the claim but I would say that recursive
functions would be much faster/less-resource-intensive that tags.  Tags
maintain a lot of references (the caller chain, the tag nesting chain, etc)
not maintained by functions and so forth.

Jim Davis



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:229947
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