openmicroscopy/openmicroscopy — pull request #290 by cneves (2012-08-15 15:26:02+00:00)
Title: Improve connect performance

This series of commits makes gateway.connect() faster by not loading the event context every time. It was needed previously to load _username and _userid, but then these were not used on every connection so it is better to lazily load them later. _username is not used at all so it was just removed.

Other places in the code were user _userid and _user assuming that it was already loaded, but since that's no longer the case a call to getUser() is needed (though it is properly cached).

Also a setUserId method was added so when we already know the user id on joining a session (the omeroweb decorators will have this info) the user id can be set without a need to getEventContext, greatly improving performance in common web code paths.

A costly debug pattern was also removed.