On Friday, Sep 19, 2003, at 19:46 US/Pacific, Adam Churvis wrote: > First, CFIMPORT is running only once, but the x:tag is being called > 100,000 > times. In the real world, CFIMPORT would be called on every page > using a > custom tag.
Correct. But <cfimport> is a *compiler* directive and doesn't really do anything other than instruct the compiler how to process <prefix:tagname>. > Second, you're not using an entire library of custom tags, so CFIMPORT > isn't > doing anything near what it would in a real application, where it has > to > import an entire directory of custom tags every time it is called on a > page > request (not just once before a loop within a single page). See above - <cfimport> doesn't *do* anything other than tell the compiler what to do with the <prefix:tagname> calls. I re-ran the test with an empty loop and a loop running just <cfimport> (both 100,000 times): empty loop: 470 cf_tag: 12413 cfmodule: 13180 cfimport: 526 x:tag: 10653 Hopefully this shows that <cfimport> isn't doing anything worthwhile at runtime? I expect the (small) difference is due to the whitespace generated by the additional blank line in the <cfimport> loop... > Third, you're calling all syntaxes on the same page. I would think > this > would skew the numbers substantially, even though you're separately > timing > each. How would it skew the numbers? Have you split the test file into three separate files to see if it actually does change the timings? (It might, I've no idea - but I'd be surprised if it did) > Fourth, your CF_tag example has the tag in the same directory as the > calling > template, so you're not getting any hit from having to search for the > tag, > which typically happens in real applications. Well, it *is* searching but it's finding it immediately. Given how CFMX caches the location of each and every custom tag it invokes, I'd be surprised if the actual location of the custom tag made a huge difference. > I just need to acid test the premises I have been going on, and > I sincerely appreciate your help with this. I'd strongly suggest you conduct tests of your own to satisfy your curiosity. Seriously! I can knock up any number of simple, inline tests but I can't cover all the cases that you're interested in so you are better placed to construct tests that relevant to your usage. Sean A Corfield -- http://www.corfield.org/blog/ "If you're not annoying somebody, you're not really alive." -- Margaret Atwood ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm?link=i:4:137789 Archives: http://www.houseoffusion.com/lists.cfm?link=t:4 Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Get the mailserver that powers this list at http://www.coolfusion.com

