It's for a multilingual site. Every bit of text on every page (every button, label,
alt, and open text) has been replaced by:
#label.labelname#
An Application scope structure has been set up in Application.cfm (from a database
query) to pre-load all the text in all the languages once only. During each page
request Application.cfm sets the local structure variable "label" to the appropriate
language data. This local variable is used through each page to substitute the correct
language text.
So I have ONE copy of all the data in an Application variable, and one *reference* to
it in a local variable (no extra memory used). An important fact that I document all
over it is that the local variable "label" is a reference to Application scope data,
and really should be locked. But I am requiring and expecting that it will only be set
ONCE at the start of the application.
The alternative would be to stick perhaps HUNDREDS of copies of the following on EACH
page:
<cflock scope='application' timeout='30'
mode='readonly'><cfoutput>#label.labelname#</cfoutput></cflock>
Which I am not doing.
This scheme is very efficient and the pages just FLY.
At 05:09 PM 8/30/00 -0400, Dave Watts wrote:
>> 1. It's going to reside in memory one way or the other.
>> Either one copy as an Application variable or one copy for
>> each page request currently executing as a "variable"
>> variable or a request variable. This isn't idle curiosity for
>> me, I am doing this on a site that has almost a thousand
>> "constants" each page needs.
>
>Yikes! That's a lot of variables! Why so many?
>
>To answer this question satisfactorily, you'll need to do a load test. You
>could do this pretty easily, with the right equipment. I've never had to
>track that many individual discrete pieces of information in a single
>application, I don't think.
>
>Dave Watts, CTO, Fig Leaf Software
>http://www.figleaf.com/
>voice: (202) 797-5496
>fax: (202) 797-5444
---------------------------------------------------------------------------
Peter Theobald, Chief Technology Officer
LiquidStreaming http://www.liquidstreaming.com
[EMAIL PROTECTED]
Phone 1.212.545.1232 Fax 1.212.679.8032
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.