Closed
Bug 1322411
Opened 8 years ago
Closed 8 years ago
Use requestIdleCallback for getting job data updates
Categories
(Tree Management :: Treeherder, defect)
Tree Management
Treeherder
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: jgraham, Assigned: jgraham)
Details
Attachments
(2 files)
This is a background task, so we can let the browser schedule it at some convenient time when nothing more important is happening.
Comment 1•8 years ago
|
||
Assignee | ||
Updated•8 years ago
|
Attachment #8817247 -
Flags: review?(cdawson)
Updated•8 years ago
|
Attachment #8817247 -
Flags: review?(cdawson) → review+
Comment 2•8 years ago
|
||
Commit pushed to master at https://github.com/mozilla/treeherder https://github.com/mozilla/treeherder/commit/1a85cf974aa1b53b2d28517ef89146c71e8a446b Bug 1322411 - Use requestIdleCallback to get jobs data updates. (#2022) * Bug 1322411 - Refactor some resultset_store.js code to use es6 features In particualr use some fat arrow functions and reformat a little code for improved brevity and clarity. * Bug 1322411 - Use requestIdleCallback for scheduling job data refreshes. This is a background task, so we should allow the browser to schedule it at some time it isn't busy doing something more significant.
Updated•8 years ago
|
Assignee: nobody → james
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Comment 3•8 years ago
|
||
Commit pushed to master at https://github.com/mozilla/treeherder https://github.com/mozilla/treeherder/commit/60f6c3022ef00852f054d1fde715064b00081170 Revert "Bug 1322411 - Use requestIdleCallback to get jobs data updates. (#2022)" This reverts commit 1a85cf974aa1b53b2d28517ef89146c71e8a446b.
Comment 4•8 years ago
|
||
Sorry, but I had to revert this as it was causing the recent jobs lookup to hammer the API. It appears that the behaviour of this function is to *call back in at most X* as opposed to *callback at X or some convenient time*. :needinfo'ing jgraham to look at this when he gets back. In Treeherder the change is simple but we need to also sort out the issue of bad api / mdn documentation.
Status: RESOLVED → REOPENED
Flags: needinfo?(james)
Resolution: FIXED → ---
Assignee | ||
Comment 5•8 years ago
|
||
Ah, it seems that gecko doesn't implement that parameter yet :( Want to fix it in th to use a timeout + rIC in the interim?
Depends on: 1311425
Flags: needinfo?(james)
Assignee | ||
Comment 6•8 years ago
|
||
Sorry I totally misread the spec here. I didn't notice that there's a race between invoking the callbak normally and invoking it via the timeout. The timeout parameter is indeed a maximum time (kind of, since the UA may actually take an indefinite amount of extra time, so I don't really know what the use case is). We just need to add a timeout before the requestIdleCallback.
No longer depends on: 1311425
Comment 7•8 years ago
|
||
Assignee | ||
Comment 8•8 years ago
|
||
Comment on attachment 8820807 [details]
[treeherder] mozilla:requestidle_jobs > mozilla:master
Only change from the previous patch is putting the call to `requestIdleCallback` in a `$timeout`.
Attachment #8820807 -
Flags: review?(wlachance)
Comment 9•8 years ago
|
||
Comment on attachment 8820807 [details]
[treeherder] mozilla:requestidle_jobs > mozilla:master
This looks fine, I'm going to assume that you've tested this locally (if not, please do before landing)
Attachment #8820807 -
Flags: review?(wlachance) → review+
Comment 10•8 years ago
|
||
Commits pushed to master at https://github.com/mozilla/treeherder https://github.com/mozilla/treeherder/commit/79a0c8b92e4263f286b7905d6e7d58ed3974deb4 Bug 1322411 - Refactor some resultset_store.js code to use es6 features In particualr use some fat arrow functions and reformat a little code for improved brevity and clarity. https://github.com/mozilla/treeherder/commit/c2c36a01a7f2508ba7fbebef59d2f871370fd864 Bug 1322411 - Use requestIdleCallback for scheduling job data refreshes. This is a background task, so we should allow the browser to schedule it at some time it isn't busy doing something more significant.
Updated•8 years ago
|
Status: REOPENED → RESOLVED
Closed: 8 years ago → 8 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•