![]() When user has Travis CI's web page open in the background we should not process pusher events immediately, because she will not see the changes on a page anyway. During peak hours we can get several messages per second, which requires some CPU work almost all the time. By using visibility API we can detect if the tab with Travis CI is in the background and if that's the case we will process pusher messages in batches every 5 minutes. This is much better for the CPU, because it means one bigger spike every few minutes and additionally some of the updates don't have to be done (for example if we get several job:started events, Ember's run loop will process only last one when it comes to rendering 'current' build). |
||
---|---|---|
.. | ||
app | ||
config | ||
data | ||
lib | ||
spec | ||
vendor | ||
travis.coffee |