Joerg Heinicke wrote:


It would work, but IMO the current implementation is better because it is more fine-grained. Synchronizing the block on the map (yes, you don't need a synchronized map then) blocks all requests for the execution of this block while this impl blocks only the requests for the current server session. Only the access to the map itself must be blocked for all requests.

Joerg


This is somewhat of an illusion. The only other thing happening is the allocation of the HttpSession when required. The idea that synchronizing around the whole operation is worse than synchronzing twice to manipulate the map - and synchronizing the session, is going to make a noticable performance difference just doesn't fly.



Reply via email to