> I've got a new programmer working for me (on contract) and I'm finding he's 
> using session Vars all over the place. He
> creating session Vars on forms that have a hundred fields, he putting arrays 
> into session Vars, etc. I just went through
> a few of the programs he wrote and used them, then I dumped my session vars 
> and found I had over 250 session vars
> from just using a few programs. Considering the site has over 1,000 users on 
> it at any given moment, I'm very concerned
> about this practice.
>
> Am I nuts, or is this just bad?

There are several possibilities:

1. You are nuts, and this is just bad.
2. You are nuts, and this is not bad.
3. You are not nuts, and this is just bad.
4. You are not nuts, but this is not bad.

The problem is, we don't have enough information to answer your
question. We cannot accurately determine whether you're nuts, or
whether this is bad. There's nothing inherently inappropriate about
storing arrays in session scope, or submitted form fields, etc. It
depends (as Jochem pointed out) on what your application is intended
to do, and the potential use-case scenarios around your application.
While memory is limited, it's much more efficient to store things in
memory rather than refetch them from a database - database
interactivity is typically the most expensive portion of an
application. If you had unlimited memory at your disposal, it would
make perfect sense to just store everything in there until you
absolutely have to write it to a persistent data store. But you don't
have unlimited memory, so you have a balancing act. We all would need
far more information than you've provided to tell you whether you're
off-balance one way or the other.

I will say this, though - there's a reason we have 64-bit servers nowadays.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
http://training.figleaf.com/

Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
GSA Schedule, and provides the highest caliber vendor-authorized
instruction at our training centers, online, or onsite.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349691
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to