7 Steps To Get The Best Coldfusion Web Application Performance

  • Explain what performance tuning is.
  • Show how it can help.
  • Show some simple steps your developers can implement quickly to speed up your web application.

What is performance tuning in SQL?

Is your web application slowing down? Lucky you! Reduced speed is often the cost of popularity.

Follow these simple steps to optimize your database and its functions:

1. Clean up your SQL

Structured Query Language, or SQL, is the circulatory system of your web application. What you want your application to do, and where you want it to go, relies almost-exclusively on well-structured SQL. ColdFusion performance maestro Gert Franz has a laundry list of performance tuning tips and tricks, which he kindly stuffed into a presentation available to everyone. Franz’s presentation is rather in-depth, and outside the realm of mere mortal minds (he studied astrophysics before switching to IT). Yet it’s worth the time for any developer trying performance tuning in SQL at a granular level. Here are the main takeaways:

  1. Get rid of as many queries as you can afford to. While this may seem counterintuitive, many apps are laced with unnecessary queries and duplicates which can easily be cut.
  2. Avoid queries of queries . Layering like this has a multiplicative effect on run time, and can be easily worked around.
  3. Avoid ; use arrays instead. Lists offer only sequential access to a bit of data, creating a set of built-in hurdles to get to whatever your application needs.
  4. Minimize database calls — they’re time and resource hogs.

2. Find the garbage collection sweet spot

“Garbage collection” is tossing aside an app’s leftover parts and scraps of code. ColdFusion expert Mike Brunt writes in his blog that he uses garbage collection as a barometer for performance; to see the general state of things within the “engine room.” Done too often, garbage collection can rob an application of precious resources. Done too little, those half-used and discarded bits of code can accumulate and cause havoc. Finding an ideal middle ground will go a long way and will keep your application running smoothly.

3. Expect success when modeling your database

Too often, companies underestimate their own potential. Brunt says he often finds poorly-planned data models to be a common culprit behind slowing applications. Give your team time to think big and aim high, then design a database to match those aspirations. “Think of the database as a heart,” Brunt writes . “If it falters or fails, your application will suffer the same fate.” Humility isn’t a bad thing, but it can hurt your bottom line.

4. Ongoing maintenance

Brunt suggests establishing good habits within your database, namely its indexes. Efficiency is key here, by establishing table indexing that processes data quickly. Then, as the application grows and evolves, keep reviewing those indexes and make changes as necessary. Performance tuning in SQL is more than just periodically digging under the hood. Preventative work can spell the difference between a minor tweak and an all-hands-on-deck freakout. By keeping an eye on your indexes, as well as other components of your web application, you’ll save yourself headaches down the line.

5. Check your hardware

Make sure your hardware is optimized, especially hard drives. CIOs too often focus on glitzy headline numbers, like CPU clock speed and RAM. These are, of course, important. Adobe suggests making sure CPUs, memory and hard disks are as fast as possible. But it’s actually poorly-configured hard drives which could cost precious seconds.

6. Monitor your logs and metrics

Logs give an accurate picture of what your app is doing. This can be made easy by using ColdFusion’s built-in tools, including Server Monitor. Don’t forget CF Stat though. Brunt uses the old ColdFusion standby to pull up insightful information not offered by its newer, younger variants.

7. Load test as often as you can

Preventative maintenance and nifty performance tuning tricks can only go so far. You need to test the effectiveness of your performance tuning. Load testing means simulating real-world usage and testing capacity. This can show your progress and uncover unseen inefficiencies. “It’s the only way to find out what’s really going to happen when you’re out in the wild.” — Mike Brunt



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Michaela Light

Michaela Light


ColdFusion development, security and optimization. CEO at TeraTech. Host of CF Alive podcast.