Structure style evaluation rocks

I'm doing some work on a site that has some major bottlenecks and one of them is a number of bad query of queries. Part of this (which I'll deal with later) was a few evaluate() functions. By removing the evaluate() and replacing it with structname[variablename], it sped up the page by something like 1000ms. Granted, the variable is a reference to a query and the evaluating to the query may have been the problem, but the bottom line is that it made things faster.

So what can you take away from this? NEVER use evaluate if you know what structure the variable you are dealing with is contained in. Need to evaluate something that came in a form? Use form[variablename]. Need a page based evaluation? Try variables[variablename]. This should be set not only as a best practice but as an indicator of ColdFusion proficiency.

Related Blog Entries

Comments
BlogCFC was created by Raymond Camden. This blog is running version 5.9. Contact Blog Owner
House of Fusion | ColdFusion Jobs @ House of Fusion | Fusion Authority