I am writing the cfquery inside the cfoutput tag. It can be written outside the cfoutput tag. My question here is do we have any performance issues if we write the cfquery inside the cfoutput ?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In my experience the fastest way for the server is that you put
<cfoutput></cfoutput>only around areas that contain variables – otherwise CF has to scan through everything inside the tags to see what it does and doesn’t have to translate for variables/functions.Content unnecessarily wrapped in
<cfoutput>also tends to produce unwanted whitespace, which might influence documentsize and downloadspeed.I don’t know if there are any reliable performance tests with the latest ColdFusion versions proving my opinion, and I want to point out, that there are certainly a lot of things more important for ColdFusion performance than having
<cfoutput>in the right place (e.g. caching queries, content caching, scoping variables etc.).