You will be redirected in 30 seconds or close now.

ColdFusion Authors: Yakov Fain, Jeremy Geelan, Maureen O'Gara, Nancy Y. Nee, Tad Anderson

Related Topics: ColdFusion

ColdFusion: Article



One of the topics that comes up most often when talking with CF developers about ColdFusion is performance. Recently, I assisted two CF developer friends with some site speed problems that they were having. One of them is a beginner, a developer who couldn't understand why his site was running slow, or why his Web hosting company was yelling at him that his pages were spiking CPU usage on their server (the horror!). He runs a fairly well-trafficked Web site, and is truly representative of the fact that CFML is a language that will let a novice get up and running fairly quickly, with just an idea and a little bit of technical know-how to put together a professional looking site.

It also shows that while CF enables folks to do this, a few months down the line, as site traffic starts to build - most will hit a bit of a roadblock. After a few hours of work going through his code, I had his site up and running significantly faster, mostly from fixing some of the usual "rookie mistakes." Among the most notable of these: every query involved a 'select *' grabbing much more data than necessary; most pages were selecting the same data over and over again using some of the strangest CFLOOPs that I've ever seen, many running the same query several times over instead of using joins or relational databases, and of course, not a single thing on his site was cached. Fixing all of these was relatively straightforward, and later that week he received a lovely thank you e-card from his Web site provider.

The second friend's site was a bit more tricky (more advanced developers always get themselves into bigger problems), and required more than just run-of-the-mill scans over code. Everything looked okay at a quick glance, and it wasn't until we started to use CF's built-in query debuggers to display execution times that we began to get to the bottom of his problem.

Ultimately, we were able to improve things by using a combination of new stored procedures in his SQL database, better passing along of session variables to eliminate redundant queries, and a run-through of the settings in CF Admin to tweak the number of pages processing. Again, he had no queries cached.

The bottom line here is that the ColdFusion server can often run only as well as its worst queries and its most poorly written pages. There's a never-ending list of tips here each month in CFDJ, as well as all over Macromedia's and the other major CF sites out there, for improving code and site performance. All of them are worth looking at. I recommend setting aside a day, and focusing just on improving site performance, going through all that code you wrote while starting out and never went back to fix, etc. It's all good info, and you, your server, and your customers will appreciate it.

A few small items of note from around the industry... The fascinating progress over at Macromedia.com has continued this month, as they give an unprecendented look "under the hood." Not only is it refreshing to see a company using their own products and putting their challenges out front, but for those of us whose livings are intertwined with Macromedia's products, it ranks near the top of the most useful case studies we've ever seen. On the CFDJ front - voting for the ColdFusion Developer's Journal 2003 Readers' Choice Awards is now under way. Hundreds of developers have cast their votes so far, and polls will be open through the end of August. Don't delay, come vote today! ( www.sys-con.com/coldfusion/readerschoice2003)

One other note - only a few months after I said I would, I've begun blogging. Follow my nutty little world at www.robertdiamond.com.

More Stories By Robert Diamond

Robert Diamond is the founder and editor-in-chief of BroadwayWorld.com, the premiere theater site on the net now receiving over 100,000 unique visitors a day. He is also the owner of Wisdom Digital Media - a leading designer of entertainment and technology web sites. He is also the lead producer on BroadwayWorld.com's consistently sold-out Joe's Pub concert series, and Standing Ovations benefit concerts. Diamond was also named one of the "Top thirty magazine industry executives under the age of 30" by Folio magazine. Robert holds a BS degree in information management and technology from the School of Information Studies at Syracuse University. Visit his blog at www.robertdiamond.com.

Comments (1) View Comments

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.

Most Recent Comments
Jason Hill 05/08/03 01:30:00 PM EDT

Hello Robert,

I appreciate your newsletter. I am a novice CF developer myself. And, as far as I know, my SELECT queries and CFLOOPS all work fine. However, I am convinced by this article that, like the first guy, there must be a lot of rom for improvent. Can I maybe send you a few lines of my "typical" code to make any suggestions? And right off the bat, can you direct me to some help in building Stored Procedures in SQL Server as well as relational and joins on database queries. Would these be good suggestions even if I am dealing with minimal records, like 1000?

Thanks for your help.
I really do appreciate it.

[email protected]
(925) 417 - 8783

IoT & Smart Cities Stories
If a machine can invent, does this mean the end of the patent system as we know it? The patent system, both in the US and Europe, allows companies to protect their inventions and helps foster innovation. However, Artificial Intelligence (AI) could be set to disrupt the patent system as we know it. This talk will examine how AI may change the patent landscape in the years to come. Furthermore, ways in which companies can best protect their AI related inventions will be examined from both a US and...
The challenges of aggregating data from consumer-oriented devices, such as wearable technologies and smart thermostats, are fairly well-understood. However, there are a new set of challenges for IoT devices that generate megabytes or gigabytes of data per second. Certainly, the infrastructure will have to change, as those volumes of data will likely overwhelm the available bandwidth for aggregating the data into a central repository. Ochandarena discusses a whole new way to think about your next...
Charles Araujo is an industry analyst, internationally recognized authority on the Digital Enterprise and author of The Quantum Age of IT: Why Everything You Know About IT is About to Change. As Principal Analyst with Intellyx, he writes, speaks and advises organizations on how to navigate through this time of disruption. He is also the founder of The Institute for Digital Transformation and a sought after keynote speaker. He has been a regular contributor to both InformationWeek and CIO Insight...
Bill Schmarzo, Tech Chair of "Big Data | Analytics" of upcoming CloudEXPO | DXWorldEXPO New York (November 12-13, 2018, New York City) today announced the outline and schedule of the track. "The track has been designed in experience/degree order," said Schmarzo. "So, that folks who attend the entire track can leave the conference with some of the skills necessary to get their work done when they get back to their offices. It actually ties back to some work that I'm doing at the University of ...
DXWorldEXPO LLC, the producer of the world's most influential technology conferences and trade shows has announced the 22nd International CloudEXPO | DXWorldEXPO "Early Bird Registration" is now open. Register for Full Conference "Gold Pass" ▸ Here (Expo Hall ▸ Here)
@DevOpsSummit at Cloud Expo, taking place November 12-13 in New York City, NY, is co-located with 22nd international CloudEXPO | first international DXWorldEXPO and will feature technical sessions from a rock star conference faculty and the leading industry players in the world. The widespread success of cloud computing is driving the DevOps revolution in enterprise IT. Now as never before, development teams must communicate and collaborate in a dynamic, 24/7/365 environment. There is no time t...
CloudEXPO New York 2018, colocated with DXWorldEXPO New York 2018 will be held November 11-13, 2018, in New York City and will bring together Cloud Computing, FinTech and Blockchain, Digital Transformation, Big Data, Internet of Things, DevOps, AI, Machine Learning and WebRTC to one location.
The best way to leverage your Cloud Expo presence as a sponsor and exhibitor is to plan your news announcements around our events. The press covering Cloud Expo and @ThingsExpo will have access to these releases and will amplify your news announcements. More than two dozen Cloud companies either set deals at our shows or have announced their mergers and acquisitions at Cloud Expo. Product announcements during our show provide your company with the most reach through our targeted audiences.
The Internet of Things will challenge the status quo of how IT and development organizations operate. Or will it? Certainly the fog layer of IoT requires special insights about data ontology, security and transactional integrity. But the developmental challenges are the same: People, Process and Platform and how we integrate our thinking to solve complicated problems. In his session at 19th Cloud Expo, Craig Sproule, CEO of Metavine, demonstrated how to move beyond today's coding paradigm and sh...
What are the new priorities for the connected business? First: businesses need to think differently about the types of connections they will need to make – these span well beyond the traditional app to app into more modern forms of integration including SaaS integrations, mobile integrations, APIs, device integration and Big Data integration. It’s important these are unified together vs. doing them all piecemeal. Second, these types of connections need to be simple to design, adapt and configure...