Thanks for the info Rob. I'd point out though that using CFModule will allow developers to store their custom tags within a folder specific to their application (kinda like encapsulating the app under one root directory), without the need to have access to the CFAdmin. In cases where we don't have control of the server, this method wins out everytime - even if we need to take a performance hit (even if it is small).
My thoughts.... Shawn Grover -----Original Message----- From: Rob Baxter [mailto:[EMAIL PROTECTED]] Sent: Friday, May 31, 2002 11:07 AM To: CF-Talk Subject: cf_ vs cfmodule (was: Quick question on custom tags) Phillip, I'm not sure what you mean by "naturally faster due to the way it's calling the custom tag". Anyway, I got curious about this and rigged up a very simple test. I wrote a simple custom tag which just displays the current time. The tag file is located in a directory which is both included in the custom tag paths of CFAdmin and also has a CF mapping to make it usuable with CFModule. I created two identical templates which looped and called the tag N times and used the GetTickCount function before and after the loop to see how long it took. The only difference in the templates is that in one loop I do <cf_TestTag> and in the other I do <cfmodule template="/tags/TestTag.cfm">. The results of this are listed below. Note that in between each test I restarted the cf service so as to clear out any kind of template mapping/caching CF might be doing. Testing was done on W2K Pro/IIS/CF5. 1 tag call: CF_ = 0-20 ms CFMODULE = 0-20 ms 10 tag calls: CF_ = 30 ms CFMODULE = 30 ms 100 tag calls: CF_ = 150 ms CFMODULE = 210 ms 1000 tag calls: CF_ = 1392 ms CFMODULE = 1913 ms 2000 tag calls: CF_ = 1422 ms CFMODULE = 2023 ms 10000 tag calls: CF_ = 15262 ms CFMODULE = 20509 ms As you can see, the CF_ calling convention is consistently faster than cfmodule. Obviously this was not a perfect or even realistic test since I doubt you'd ever be calling the same tag 100 times on one page. Also, the custom tag file was at the root of the CustomTag path so CF did not have to scan subdirectories to find it (however there were 4 other custom tag paths installed on the server for whatever that's worth). Even on the first call to a template, where I might think cfmodule has an advantage due to the explicit template path, I was unable to find a consistant winner one way or the other. Based on what I've seen here I have a hard time supporting the statement that cfmodule is faster than cf_. Anyway, it was a fun way to kill a half hour. </rob> -----Original Message----- From: Philip Arnold - ASP [mailto:[EMAIL PROTECTED]] Sent: Friday, May 31, 2002 6:26 AM To: CF-Talk Subject: RE: Quick question on custom tags > Are there any internal implemenation details which make > cfmodule faster than the cf_ syntax, or was this what you > were refering to? Just curious... CFMODULE naturally runs faster than CF_, it's to do with the way it's calling the custom tag There are general issues with using CF_ and the server caching the code, but that can be got around General advice is to use CFMODULE anyways, it doesn't look as "pretty" in the code, but it does work better Philip Arnold Technical Director Certified ColdFusion Developer ASP Multimedia Limited Switchboard: +44 (0)20 8680 8099 Fax: +44 (0)20 8686 7911 www.aspmedia.co.uk www.aspevents.net An ISO9001 registered company. ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. ********************************************************************** ______________________________________________________________________ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists