mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 14:35:27 +00:00
This speeds up CasperJS tests by 25 seconds per main app page load. When we switched the SockJS, the casper tests got inexplicably slower. I finially figured out what's going on. The first SockJS XHR request (remember that we don't get websockets in the test suite) gets considered part of the page load and therefore the PhantomJS onLoadFinished handler doesn't get called until the SockJS XHR finishes, which happens at the heartbeat, 25 seconds later. To fix this, we simply don't create the SockJS object on page load since it will be created on demand, anyway. (imported from commit 845a97526c5102df426cd6fc26182a734e7fcab6)
16 KiB
16 KiB