I'm just coming out of a year's worth of development on a very similar project, 
and let me tell you... LESSONS LEARNED.

Do not, do not, do not, rely on ColdFusion for heavily object-oriented CFCs 
that store their own data (in the CFC itself).  It's just not ready.  Don't get 
me wrong, I'm not talking about reasonable OO, but we had some consultants who 
were creating CFCs like pure Java classes (with lots of inheritance and 
override functions). After we added just one real customer, the server crashed 
hard (the pages took way too long to load, the memory added up and threads ran 
out).

That said, we have since revamped a lot of the architecture and now the site 
flies.  I would recommend:

Store as many reusable CFCs as possible in the application scope, so long as 
they don't hold any per-request data.  For your visitor tracking, I would 
suggest one CFC in the application scope that just manipulates session data.  
DON'T create and store a CFC for every visitor in session; it's a waste of 
memory.

Cache as many queries as possible using cachedwithin.  Caching queries is, 
consistently, in many different projects, by far the biggest performance 
improvement in CF I've ever encountered.  Be reasonable and don't cache stuff 
just for the sake of it, though. Caching articles for a few minutes is fine (I 
only do 30 seconds on HPANA.com). I use an application-scoped CFC to grab 
news/article content and query cache them as needed.

For your congressional database, I'd say (depending on how many rows it is) 
consider query caching the whole thing for up to 24 hours. Then use 
query-of-queries when you want to access it on a per-ZIP Code basis.

A good way to look at memory is to turn on the JVM's garbage collection 
debugging output.  You'll see from a bird's eye view how the memory grows with 
each request and how much garbage collection the JVM has to do when the time 
comes.  All of this impacts performance in the end.

It sounds like you already know most of what you have to do, and have the 
knowledge and research ability to figure out the rest.  Good job!


---
Jeff Guillaume
Kazoomis Online Media
http://www.kazoomis.com

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:250873
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to