For question 3, the biggest difference is whether you can have CF processing in your files. Usually for config stuff, CF is not used, so either will work in this case. CFFILE does not have the overhead associated with the CFSAVECONTENT tag (minimal, but still there), nor the CFMX compilation cycle. However, CFFILE doesn't get the benefit of cached templates like the CFINCLUDE would from the CF server. Both will benefit from filesystem-level caching/buffers.
I suspect that CFFILE is faster than CFSAVECONTENT/CFINCLUDE because there is no processing overhead, but you'd have to do some tests to see if that's the case (loop over each one a few thousand times and use gettickcount() to see how long it takes). To get to the final point though, if it's a config file that's static, just read it once, and cache it somewhere (probably the parsed representation, rather than the raw data), and then the discussion is moot. cheers, barneyb --- Barney Boisvert, Senior Development Engineer AudienceCentral (formerly PIER System, Inc.) [EMAIL PROTECTED] voice : 360.756.8080 x12 fax : 360.647.5351 www.audiencecentral.com > -----Original Message----- > From: Brad Roberts [mailto:[EMAIL PROTECTED] > Sent: Thursday, March 27, 2003 11:30 AM > To: CF-Talk > Subject: cffile vs. cfinclude > > > Here's some questions I have about cffile... maybe someone can > help me out. > > 1. All I've been able find out about performance, is that > "extensive" use of > cffile will create a performance problem because of the slow > nature of disk > I/O. What is extensive? > > 2. As far as disk access is concerned, what's the difference between CF > reading a file using cffile, and inculding one using cfinclude? > > 3. Which of the following (if either) is better? > > <cffile action="read" file="test.xml" variable="foo"> > > -OR- > > <cfsavecontent variable="foo"> > <cfinclude template="test.xml"> > </cfsavecontent> > > > -Brad > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4