CF Tip of the day: Speed up dumps with TOP

I do a lot of cfdumps with queries, but always forget to use the top attribute introduced in ColdFusion 8. You can use the top attribute to dump just the top x number of records from your query. When dealing with a wide query 500 rows, dumping the first 10 will give me more than enough information to do what I need to do, without waiting for the browser to finish rendering a huge dump table.

Posted by Daniel Short on Sep 23, 2009 at 8:33 AM | Categories: ColdFusion -

3 Comments

todd sharp

todd sharp wrote on 09/23/09 9:11 AM

Good tip. You can also dump in plain text which obviously saves all the rendering time, but I find that a bit harder to read.
Brian FitzGerald

Brian FitzGerald wrote on 09/23/09 9:55 AM

Really nice tip! I didn't realize that existed. I'll definitely use that.
Ben Nadel

Ben Nadel wrote on 09/23/09 12:39 PM

TOP is definitely my friend! You don't realize how much of the page load time is actually the output and rendering of your CFDump until you put TOP in there and it's so much faster.