summaryrefslogtreecommitdiffstats
path: root/client-compiler/src
diff options
context:
space:
mode:
authorFabian Lange <lange.fabian@gmail.com>2014-07-12 00:00:41 +0200
committerFabian Lange <lange.fabian@gmail.com>2014-07-21 13:55:59 +0200
commit4fafa9dbbccc387e0bd3c1a0d44f74b3a111b06c (patch)
treea3a0952d5575f1c6939b657d84e494405d72a078 /client-compiler/src
parenta197bd64db7521749c16551cc238890aea0fa113 (diff)
downloadvaadin-framework-4fafa9dbbccc387e0bd3c1a0d44f74b3a111b06c.tar.gz
vaadin-framework-4fafa9dbbccc387e0bd3c1a0d44f74b3a111b06c.zip
Improves performance of VaadinService.requestEnd(). (#14218)
Doing two times session.accessSynchronously is unnecessary effort in multiple aspects: * The session will be locked twice. * CurrentInstances are set twice. * CurrentInstances are restored twice. * VaadinSession being checked for being the current via VaadinService.verifyNoOtherSessionLocked(this); When we leave requestEnd we unset all CurrentInstances. There is no need to just restore them before doing so. When we are in requestEnd, VaadinSession is set to "current" by PushHandler.callWithUi() or VaadinService.handleRequest(). Also, the cleanupSession code does not need any of these thread locals, so not having them set would also not hurt. having an extra accessSynchronously call for just setting the duration does not make a lot of sense. While it somehow wants to make the previous accessSynchronously call to be counted completely into the duration it invests an the same time that would have been left out additionally. VaadinService removeClosedUIs is a cleanup which also locks and sets CurrentInstances just to figure out that the UI it is checking is not closing. This change moves that check out of ui.accessSynchronously. In the end, the resulting code is a tiny bit less robust, however it eliminates over 50% response time on trivial push request/responses. Change-Id: If71d1dbbae5d1fd57d3d4e735c592fd263261a81
Diffstat (limited to 'client-compiler/src')
0 files changed, 0 insertions, 0 deletions