> The problem appears to be when spectra does Duplicates of 
> large structures (ie the sitemodel- ours is HUGE) into 
> different scopes in memory..... The more simultanious threads 
> you have, the more likley these large copies will happen 
> together, making CF need more memory for Scratch space while 
> the copy is made....

FYI, this _specific_ issue was addressed on spectrasource.

This is not really a Spectra issue, it's a CF issue in general.

Consider this pseudo-code:

Does server.foo exist? If not, load foo.cfm
foo.cfm:
        Begin creating a large structure.
        Copy large struct to server scope.

Now, imagine foo.cfm gets called when server.foo does not exist. If you
have N people hitting the server, then all N will create large
structures. Sure, they only exist in the local Variables scope, but they
all take up memory. So, imagine that the struct is 10 megs big. If 100
people create that var at the same time... as you can imagine, the
memory usage would climb. I don't even think it's fair to call this a CF
issue, it's a code issue really. Having N people create a large
structure is not effecient. Only one person/request needs to actually
make it.

So, for the SLM, we single threaded the create. Now foo.cfm would look
like:

foo.cfm:
        Is anybody else making the big structure? No, then:
                Mark it that we are updating the big struct
                Make a local big guy
                Copy the big guy to Server.Yourmother
                Unmark it

=======================================================================
Raymond Camden, Principal Spectra Compliance Engineer for Macromedia

Email    : [EMAIL PROTECTED]
Yahoo IM : morpheus

"My ally is the Force, and a powerful ally it is." - Yoda 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the mailserver that powers this list at http://www.coolfusion.com
------------------------------------------------------------------------------
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/spectra_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to