> The question is - do you want CF to automatically handle everything > for you at the sacrifice of speed?
Raymond, My first question to you is is there ever a reason not to lock access to Session or Application scoped variables? Personally I can't think of one, much less one in which the "sacrifice of speed" would come into play. My second question is isn't it true that, assuming all other things being equal, any algorithm or function coded in binary, compiled language is going to perform better than one written in a markup language and executed in JIT or even an interpreted language executed in a virtual machine? Now, assuming the answer to both of these questions is yes, I can only believe that, in addition to being more stable in environments where developers don't lock religiously, ColdFusion would actually perform faster in any environment where developers properly lock all access to shared scope variables. > It would be very difficult to make a system smart enough to know > "Hey, I could use one lock around this particular block of code." > Therefore, we would be stuck with the slower alternative. What you neglect to mention is that when you lock access to a session variable, you lock access to all session variables, causing other, potential more common and severe performance problems, especially in regards to the "Application" scope. In the DBMS realm, these are called hotspots, and though you generally don't see a performance difference on most systems, a database that implements such a locking scheme usually fails under a heavy load. > Personally, I'd rather just do the work. It can't be that hard to > cflock, or duplicate to the request scope. Did anyone say it was hard? It isn't hard to write your own Java servlets or roll your own HTTP server in C++. However, the entire reason for ColdFusion existence, its point of being and single greatest justification for the cost is that it saves development time. Coding three lines of code to every one reference to a shared scope, inventing workarounds (i.e. synchronizing all the data to the Request scope or storing serialized session data in client variables) is not my idea of RAD. In fact, I would say it is the exact opposite. God, what would writing SQL be like if I had to manually lock access to each record before issuing a query? Better yet, people snubbed their nose at MySQL because it didn't have row level locking but that is, in essence, how ColdFusion behaves: lock the whole scope instead of the variable being modified. MySQL has seen the light. Hopefully Macromedia will one of these days. Benjamin S. Rogers http://www.c4.net/ v.508.240.0051 f.508.240.0057 ______________________________________________________________________ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists