> the general opinion is that client vars are more efficient
> than session variable, as long as the administrator is configured
> to store client variables in a database, otherwise it stores client
> variables in the registry which is less efficient that using session
> vars.
Either you've got the general opinion wrong, or the general opinion is
itself wrong (or at least oversimplified).
All other things being equal, it's more efficient to store something that
will be reused in memory than it is to retrieve it from a database each time
it's needed. When you use session variables, you're storing something in the
local memory of the CF server. When you use client variables, CF has to
continually go get them whenever they're needed, if they're stored in a
database or in the registry.
Client variables are probably a better choice if you think you're going to
cluster your application on multiple servers, but on a single server,
session variables will perform much better, assuming that there's enough
memory to hold them.
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/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists