Some thoughts on client vars:

Caveat: If you are not storing client vars in your DB, and on a real 
database like SQL Server or Oracle, you should probably not be using them. 
NEVER use the registry to store client vars (your server *will* eventually 
fill it's registry and crash), and if you are using Access, forget about 
speedy client vars.

Well, as you may (or may not) know, client variables are stored all mushed 
together by CF, and put into the database as one big long string, almost 
like a URL string.  Each client variable needs to be parsed out of this 
string in order to be retrieved, and the more client variables, the longer 
this string is, and theoretically, the longer it should take to retrieve 
and store a particular client var.

Devil's Advocate: We know these client var set and retrieval routines are 
highly efficient and optimized, and internal to the CF engine. But I do 
wonder what the effect may be of, say having hundreds or even thousands of 
client vars.

CF Advocate: On the other hand, everyone on this list has only good things 
to say about the speed of client variables, so I really doubt that you will 
run into issues.

Now, I would have thought that MAllaircroMedia (MacroMAllairdia?) would 
have put each client var in it's own record, in order to make use of speedy 
DB indexing, and make client var's retrievable using ordinary database 
SELECT statements, and giving us the ability to do Group By statistics on 
client vars also.  However, they did not.   It may very well be that the CF 
engine caches the client var variables for periods of time, so it does not 
have to read and write for every single cleint var call, making them just 
as fast.  Anyway, this is all just pointless speculation for the most part, 
since we can't do anything about it.

Douglas Smith

At 03:23 PM 4/17/01, Brook Davies wrote:
>Hi,
>
>What I want to know if how much is too much when it comes to client vars
>with DB storage. If each client has 40 variables that are be written to the
>db on ever request, will these slow things down considerably? What about
>large client vars containing say 35-45k text. Is this the end of the world?
>
>What do you guys think?
>
>sqlserver 7.0 (dual 550, 1gig ram)
>IIs nt4.0, CF4.5.1, dual 550, 756 ram)
>
>Brook Davies
>Maracasmedia Inc
>
>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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

Reply via email to