> > > You should allways use CFLOCK when dealing with sessions. > > > An alternative is setting the Single Threaded Sessions in > > > the CF Administrator. > > > > I don't know if this is an optimal solution, but I always transfer > > all session variables to the request scope - inside a CFLOCK - > > in application.cfm. That way there's just one locked section of > > code for session variables and you don't have to remember to > > use a lock every time, just to use request.variableName instead > > of session.variableName. > > It's been our experience that this method doesn't work well if you're > storing any significant amount of data in the session or > application scopes. > It may work during functional testing, but generally fails miserably under > load.
I'll second this. I use to actually use this technique for Application scoped variables. We store quite a bit in the Application scope, and after recently eliminating request=duplicate(application) code and switching to locked calls directly to the Application scope, performance of our app under load conditions improved by about 40%. That's a VERY significant improvement in speed when NOT using that technique. It's a great timesaver for code, but if you plan your app well locking's not all that big of a deal. The tradeoff for speed makes it very worth NOT using the request scope for this specific purpose. -Cameron -------------------- Cameron Childress elliptIQ Inc. p.770.460.1035.232 f.770.460.0963 -- http://www.neighborware.com America's Leading Community Network Software ______________________________________________________________________ Why Share? Dedicated Win 2000 Server � PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER Instant Activation � $99/Month � Free Setup http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

