I just stumbled upon a fantastic little tag by Brandon Purcell, called cf_accelerate. Basically, it's a memory-based custom tag, which is reckoned to be 50x faster than CFCACHE. I just tried it out on the development version our statistics-heavy TQi website, and the difference in load speeds is quite dramatic, down in most cases from around 10 seconds to less than 2 seconds. We were using CFCACHE, but cf_accelerate just blows it out of the water. With RAM prices so cheap, this is a hugely cost-effective way of speeding up your sites. If only we'd found this earlier! The TQi site is shortly being replaced with a new all-singing, all-dancing Unistats site. Ho hum...
Read all about the tag here:
http://www.bpurcell.org/blog/index.cfm?mode=entry&entry=963
To install it, just copy it to your ColdFusion custom tags directory. If you're on JRun, this will be buried somewhere in your jrun/servers/cfusion.ear/cfusion.war/web-inf/cfusion/ node. Have a look in the ColdFusion administrator, under the "custom tags" section, and it will tell you the default path. Once you've done that, just wrap your code in a <cf_accelerate> tag, and hey presto! The only caveat I've found so far is that any CFFLUSH tags won't work, as they're now wrapped within a call to a custom tag, so just comment these out.
No comments:
Post a Comment