Closed
Bug 1104062
Opened 10 years ago
Closed 10 years ago
Optimize or remove thCloneJobs.resetCounts
Categories
(Tree Management :: Treeherder, defect, P1)
Tree Management
Treeherder
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: mdoglio, Assigned: camd)
References
(Blocks 1 open bug)
Details
(Keywords: perf)
Attachments
(1 file)
According to the profiler this function is very expensive in terms of cpu. I'm not sure what its purpose is. After commenting this function I was able to load 120 pushes without getting the unresponsive script dialog.
Reporter | ||
Updated•10 years ago
|
Updated•10 years ago
|
Priority: -- → P1
Assignee | ||
Comment 1•10 years ago
|
||
Looking at resetCounts(), it appears that we walk over ALL resultsets for EACH resultset. So that is a multiplier that's in incredible waste of time. This may not be the ONLY inefficiency, but it's one of them.
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → cdawson
Assignee | ||
Updated•10 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•10 years ago
|
||
This PR changes the ``resetCounts`` function to operate on only a single ``resultset`` rather than ALL resultsets in the ``resultSetMap``. And that function is now only called once per resultset after all the platforms have been updated.
Previously, this function was called on ALL ``resultsets`` each time a ``platform`` within a ``resultset`` was updated. 10 resultsets X 30 platforms = 3000 calls. As you loaded more ``resultsets``, this was compounded.
Now this is called once for a resultset only when that resultset is updated (or initially loaded).
Assignee | ||
Comment 3•10 years ago
|
||
Attachment #8535103 -
Flags: review?(mdoglio)
Reporter | ||
Updated•10 years ago
|
Attachment #8535103 -
Flags: review?(mdoglio) → review+
Comment 4•10 years ago
|
||
Commits pushed to master at https://github.com/mozilla/treeherder-ui
https://github.com/mozilla/treeherder-ui/commit/9ed0ab43b59043e7bbc33a802fc8c1b92c3892f6
Bug 1104062 - only update counts once per resultset on changes
https://github.com/mozilla/treeherder-ui/commit/89b6362bd0c378cac26ed87071889d6ea9c10957
Merge pull request #299 from mozilla/optimize-resetcounts
Bug 1104062 - only update counts once per resultset on changes
Reporter | ||
Updated•10 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Comment 5•10 years ago
|
||
Commits pushed to master at https://github.com/mozilla/treeherder
https://github.com/mozilla/treeherder/commit/57c6318cece400d4a6414de157c7b1ab6db9381e
Bug 1104062 - only update counts once per resultset on changes
https://github.com/mozilla/treeherder/commit/dd31025b8cca9121a17a6c07f24c89c735dc0871
Merge pull request #299 from mozilla/optimize-resetcounts
Bug 1104062 - only update counts once per resultset on changes
You need to log in
before you can comment on or make changes to this bug.
Description
•