Replace Timer.jsm with native setTimeout/setInterval methods on the JSM global
Categories
(Core :: XPConnect, task, P3)
Tracking
()
People
(Reporter: kmag, Unassigned)
References
(Blocks 1 open bug)
Details
(Whiteboard: fission-memory)
Timer.jsm uses much more memory in content processes than native implementations would.
Updated•4 years ago
|
Updated•4 years ago
|
Comment 1•4 years ago
|
||
Not essential for Fission Beta, should get triaged for correct priority with other memshrink work. Below is some context from kmag's conversation on matrix.
kmag: It'll be a few KB. It's unfortunately just a bit messy to implement. None if the existing timer stuff is easily reusable and adding globals to JSM scopes is... not trivial at this point
There is a much quicker short-term version where we'd keep Timer.jsm but have it export a native API like I did for Services.jsm, though. That'd probably take about half the time. Maybe less. So I may do it.
But we'd save a bunch of additional memory from removing the code that imports Timer.jsm. There's a bunch of it, and it adds up quickly. And it's pretty hard to quantify until you actually remove it. I tend to just see huge surprise memory improvements when I do those sorts of refactorings.
Updated•4 years ago
|
Updated•4 years ago
|
Description
•