I've found cf flush to be useful when you are serving up long tabular report data. If you are going to output several hundred rows, cfflush can help a lot. One approach I've used that works great for intranet sites where the browser is a known item is a combination of a status bar, javascript and cfflush. I create a flash movie that has a status bar with frames from 1 to 100 (1 being an "empty" bar and 100 being "filled") based on a variable I can set using the "SetVariable( )" function in Javascript. Then, as I'm outputting data I increment that variable using cfflush and javascript.
For example, using MOD 100 (or whatever threshold makessense to you) and currrent row I could run a calculation that gives me the percent commplete of the output. let's say 13 percent at row 200. Then, I would write this: ( <script> movie.SetVariable(13,"13%"); </script >) .. the first item is the frame number I want the movie to go to and stop, the second variable is a label. I use <CFFLUSH> to send it to the html page where it is run "inline" immediately. The result is a nice looking status bar that climbs incrementally at the top of the report and lets the user know that data is being sent to the browser and to please be patient. This approach can be useful for things like data upload tools where user uploads a spreadsheet or database that is subsequently inserted into a table or appended to a file.
For source files click here.
The example below loops through a query and updates the movie based on flushing 10 rows at a time.