Connecting Tech Pros Worldwide Forums | Help | Site Map

Help Needed for fine-tuning CF code

Newbie
 
Join Date: Jan 2007
Posts: 28
#1: Jan 23 '07
Hi All,
I am working on a web page which is built in ColdFusion.
The problem is it's performance.The page takes lot of time for appearing on the screen.I have fine-tuned my code to follow the best practices of CF but somehow could not find any improvement in the performance.I have found-out that the query does not take much time but while rendering the data on the screen it takes most of the time.I am using the cfoutput tag to loop over the query data.

Can someone please help me out with the possible solution.

Thanks.

acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,581
#2: Jan 23 '07

re: Help Needed for fine-tuning CF code


Hello and welcome to TheScripts.

If you haven't already, see this page for tips on performance.

I have found that one of the largest bottlenecks is when retrieving data from the database. To counter this, if your data does not need to be current (say, an hour old is fine), you can cache the query by using the CachedWithin attribute of the CFQUERY tag. You can also use Query of queries which queries an existing query rather than get new data from the database for each piece of data. You could also reorder SQL clauses.

See if that helps and post again if you need more help.
Newbie
 
Join Date: Jan 2007
Posts: 28
#3: Jan 23 '07

re: Help Needed for fine-tuning CF code


Thanks mate.
I'll try that.


Quote:

Originally Posted by acoder

Hello and welcome to TheScripts.

If you haven't already, see this page for tips on performance.

I have found that one of the largest bottlenecks is when retrieving data from the database. To counter this, if your data does not need to be current (say, an hour old is fine), you can cache the query by using the CachedWithin attribute of the CFQUERY tag. You can also use Query of queries which queries an existing query rather than get new data from the database for each piece of data. You could also reorder SQL clauses.

See if that helps and post again if you need more help.

Reply