Bug 1788050 Comment 0 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

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:

https://searchfox.org/mozilla-central/search?q=setTimeout&path=remote%2F&case=false&regexp=false
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:

https://searchfox.org/mozilla-central/search?q=setTimeout(&path=remote%2F&case=false&regexp=false
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:

https://searchfox.org/mozilla-central/search?q=setTimeout%28&path=remote%2F**%2F*.mjs&case=false&regexp=false

Back to Bug 1788050 Comment 0