So, five session vars, numeric in value, less than four digits (or single char values), along with multiple client vars of less than 4 digit numeric values or single chars - you're saying that's a huge eff'n no??

I ask because at even 10,000 page views a day, I see no performance hit at all. But then, maybe if I change it according to some rule, I would see average CPU loads of 0.004 instead of 0.04??

_____________________
Derrick Peavy
derr...@derrickpeavy.com
404-786-5036

“Innovation distinguishes between a leader and a follower.” -Steve Jobs
_____________________



On Jan 4, 2010, at 3:23 PM, Cameron Childress wrote:

Since the topic of the next ACFUG meeting is how NOT to code CF, I'd be interested in seeing some examples from people on the list of code that you frequently see. Also - why is it wrong? Does it present a security or performance problem? Is it a big time no-no or is it just a minor thing or maybe annoying (or hard to read) syntax?

This may provide John with some good fodder for his presentation as well...

Of course, there are exceptions where almost anything is appropriate, however...

I'll mention one I see ALL THE TIME - enabling both client and session variables in the Application.cfc|cfm when only one is being used. Can become a serious performance issue under load. I guess along with this is actually using BOTH session and client variables in the same application.

Also, using lists where you should be using an array, struct, or other faster mechanism. The longer lists get in CF, the slower they get. I have seen lists with 1,000 or so items totally choke under load. This can show up in unexpected places too like listFind(valueList(query.column), myValue).

What are some of your pet peeves and examples of downright bad code?

-Cameron

--
Cameron Childress
Sumo Consulting Inc
http://www.sumoc.com
---
cell:  678.637.5072
aim:   cameroncf
email: camer...@gmail.com

Reply via email to