Thanks for clearing that up for me
KOla
-----Original Message----- From: Philip Arnold - ASP [mailto:pra@aspmedia.co.uk] Sent: 10 May 2001 12:03 To: CF-Talk Subject: RE: cfloop vs cfoutput
> Sorry for the crosspost (had conflicting answers from other lists) > > but is there a consensus on which method of looping over a query > is fastest? > > cfloop or cfoutput..
OK, I know you've posted a "Winner" post, but here's the reasoning behind why CFOutput is slower than CFLoop
When you run a CFOutput, CF has to look through as see what has to be converted for "output", i.e. #s around variables etc.
When you run a CFLoop, it just assumes that anything that's a non-CF tag is to be sent to the browser, and it runs the tags as it reaches them
Ideally, you should put a CFLoop around the code you wish to loop over, and only put CFOutput around the variables you want outputted - that provides the best performance on the server (which is probably the most important in most circumstances)
Although, I don't like using this method for development (it's harder to read), the performance over many thousands of hits is noticable
HTH
Philip Arnold Director Certified ColdFusion Developer ASP Multimedia Limited T: +44 (0)20 8680 1133
"Websites for the real world"
********************************************************************** 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. **********************************************************************