I couldn't agree more.  Did you know that if you have client variables
turned on CF will generate two select statements for every single page hit?
And, if you don't turn off global client variable updates (which are turned
on by default), you also generate an INSERT/UPDATE statement for every page,
even if you aren't accessing any client variables on that page.  To me
that's a whole lot of unnecessary database calls, which will seriously
impede performance.

As Dave points out, most people are aware of how important query caching is,
but many of those same people use client variables, without a need for
storing information from session to session or supporting a clustered
environment, thereby creating a tremendous amount of database traffic.

Bob

-----Original Message-----
From: Dave Watts [mailto:[EMAIL PROTECTED]]
Sent: April 23, 2001 1:32 PM
To: CF-Talk
Subject: RE: Session VS Client


> the problem with session vars is if CF server restarts itself
> (which can, sometimes, be a good thing) you lose the session.
> i use client vars exclusively over session vars now (and cookies
> too) and store them in a DB. not as fast as memory in *theory*,
> but in practice it's more reliable and there's no difference in
> the performance of my applications.

Maybe there's no difference in the performance of your applications, but
I've often seen the move from session to client variables (usually in
preparation for clustering) slow down applications significantly. If you
store enough data in the Session scope, it's not practical to just move that
data to the Client scope, as you'll end up with quite long strings.

Session variables are more robust, certainly (when stored in a database),
but they're definitely quite a bit slower. This makes sense - otherwise, why
would we bother caching queries and output to make applications faster,
rather than just returning to the database for every data view?

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to