Merge lp://staging/~doanac/ubuntu-ci-services-itself/webui-status-performance into lp://staging/ubuntu-ci-services-itself
Status: | Merged |
---|---|
Approved by: | Andy Doan |
Approved revision: | 311 |
Merged at revision: | 322 |
Proposed branch: | lp://staging/~doanac/ubuntu-ci-services-itself/webui-status-performance |
Merge into: | lp://staging/ubuntu-ci-services-itself |
Prerequisite: | lp://staging/~doanac/ubuntu-ci-services-itself/json-status-styling |
Diff against target: |
86 lines (+31/-24) 2 files modified
webui/webui_status.js (+22/-24) webui/webui_status_worker.js (+9/-0) |
To merge this branch: | bzr merge lp://staging/~doanac/ubuntu-ci-services-itself/webui-status-performance |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
William Grant | browser ajax hell | Approve | |
PS Jenkins bot (community) | continuous-integration | Approve | |
Canonical CI Engineering | Pending | ||
Review via email:
|
Commit message
webui: improve performance of status page
I noticed a tricky problem. If one of the status URLs we are trying
to reach is taking a really long time, the rest of the json URLs we
try to load get delayed on the main javascript thread.
This changes the code to use JavaScript workers which essentially do
the status loading in separate threads and then communicate back to
the main gui thread the status to display.
Description of the change
I noticed a tricky issue in the new json status page in the webui. Basically one of my hpcloud nodes didn't have proper permission for port 8080. This causes the loading of that port to take forever before it fails. The way (at least firefox) was handling the jsonp loading meant that each url we tried to load after the bad URL would be blocked in a "loading..." state.
This change uses Web Workers to do the loading in another thread and then communicate the status back to the main UI thread. I wanted to get this fixed before moving to a DataTables implementation so that we could make sure we start with the correct workflow on it.
Also of note: YUI is a pain to load into a web worker, so I took the simplified approach of just calling "importScripts" to get our JSONP data.
PASSED: Continuous integration, rev:311 s-jenkins. ubuntu- ci:8080/ job/uci- engine- ci/296/
http://
Executed test runs:
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/uci- engine- ci/296/ rebuild
http://