Closed
Bug 1267102
Opened 9 years ago
Closed 9 years ago
The way we calculate search strings for jobs is redundant and inefficient
Categories
(Tree Management :: Treeherder, defect)
Tree Management
Treeherder
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: wlach, Assigned: wlach)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
1. We duplicate the logic to create a search string repeatedly in clonejobs.js, despite having a centralized space for creating it (and a logical place to call that function, in the job model).
2. We store the search string permanently, even though we only need it when filtering jobs. It would be much more efficient to dynamically calculate it when required for that, then throw it away later.
Some quick back of the envelope calculations suggest that we're wasting upwards of 2 megabytes on this in the default treeherder view (assuming 2000 jobs and 205 characters average for the string:
```
>>> len('OS X 10.10 debug W3C Web Platform Tests e10s W3C Web Platform Tests e10s W-e10s(1) Rev7 MacOSX Yosemite 10.10.5 mozilla-inbound debug test web-platform-tests-e10s-1 eb84c6ab9e0bc1385031cdcad93df1e42bd00b8e')
205
>>> 205* 10000
2050000
```
Comment 1•9 years ago
|
||
Assignee | ||
Comment 2•9 years ago
|
||
Comment on attachment 8744751 [details] [review]
[treeherder] wlach:1267102 > mozilla:master
Hey Cam, I did some quick memory profiling this weekend and this seemed like an easy win.
Attachment #8744751 -
Flags: review?(cdawson)
Comment 3•9 years ago
|
||
Comment on attachment 8744751 [details] [review]
[treeherder] wlach:1267102 > mozilla:master
Nice! This seems like a great change, and makes the code more read-able since it adds the functions to the job model, where they belong. :)
Attachment #8744751 -
Flags: review?(cdawson) → review+
Comment 4•9 years ago
|
||
Pull request has landed in master: https://github.com/mozilla/treeherder/commit/ae122751bb9af51a20e443ca159569b07edd6aed
Comment 5•9 years ago
|
||
Commit pushed to master at https://github.com/mozilla/treeherder
https://github.com/mozilla/treeherder/commit/e08d52c47404b49653c8eaaeadd2514b0e8a2d0c
Bug 1267102 - Be more efficient about storing job title + search information
Since we only need it when actually filtering the job list, just dynamically
calculate there instead of keeping a (potentially large amount) of redundant
data in memory constantly. It doesn't take long to recalculate this relative
to other expenses (such as recalculating the DOM).
Since we were storing about 200 characters per job, and that a typical push
has upwards of 2000 jobs, this can save up to 2 megabytes on the default
treeherder view of 5 pushes.
Updated•9 years ago
|
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Comment 6•9 years ago
|
||
Commit pushed to master at https://github.com/mozilla/treeherder
https://github.com/mozilla/treeherder/commit/76849cd222394a60b3ea63fb973afd5a82ef5c9a
Bug 1267102 - Fix platform filtering
You need to log in
before you can comment on or make changes to this bug.
Description
•