Use Timer.sys.mjs module instead of "setTimeout" in modules running in child processes
Categories
(Remote Protocol :: Agent, enhancement, P3)
Tracking
(firefox115 fixed)
Tracking | Status | |
---|---|---|
firefox115 | --- | fixed |
People
(Reporter: whimboo, Assigned: victoria.o.ajala, Mentored)
References
(Blocks 1 open bug)
Details
(Keywords: perf, Whiteboard: [webdriver:m7][webdriver:external][lang=js][webdriver:relnote])
Attachments
(1 file)
With the feedback that I got from Olli Pettay when I talked with him about performance and power usage we should not use setTimeout()
in our JSM code that runs in content processes. Problem is that these window timers are throttled when the tab runs in the background.
While this might not be a big deal for Marionette given that most tests run with the tab under test in the foreground this would be an issue for BiDi.
Instead it is preferred to use the low-level API as provided by nsITimer because no throttling will happen here.
Instances of setTimeout
that we have under /remote/
can be found here:
Reporter | ||
Comment 1•2 years ago
•
|
||
Another option would clearly be the Timer.sys.mjs
module as well given that it offers a better interface for timer management.
Reporter | ||
Updated•2 years ago
|
Reporter | ||
Comment 2•2 years ago
|
||
I spoke with Olli and the Timer.sys.mjs is only a small wrapper so it wont make much of a difference. As such to have a similar usage with other code under /remote
lets make use of this module.
Assignee | ||
Comment 3•2 years ago
|
||
I'm working on this!
Reporter | ||
Comment 4•2 years ago
|
||
Hi Victoria. I want to check with you if everything is still fine and that you know how to proceed on this bug. Or do you need any further information from my side? Thanks!
Assignee | ||
Comment 5•2 years ago
|
||
Hi @whimboo, I fell a bit sick over the weekend and I was unable to work but I will create a patch for this fix shortly :)
Assignee | ||
Comment 6•2 years ago
|
||
Updated•2 years ago
|
Updated•2 years ago
|
Comment 8•2 years ago
|
||
bugherder |
Updated•2 years ago
|
Reporter | ||
Updated•2 years ago
|
Reporter | ||
Updated•1 year ago
|
Description
•