Implement system.memory
Categories
(WebExtensions :: General, enhancement, P5)
Tracking
(Not tracked)
People
(Reporter: gregp, Assigned: gregp)
References
(Blocks 1 open bug)
Details
(Whiteboard: [design-decision-needed])
Attachments
(1 file)
| Assignee | ||
Comment 1•3 years ago
|
||
Depends on D165499
Updated•3 years ago
|
Updated•3 years ago
|
Comment 2•3 years ago
•
|
||
What are the use cases for this API?
Bug 1738348's justification is basically "because this single extension happens to be calling the API". That is not a use case; some extensions/programs request as much data as possible, for fingerprinting or debugging purposes. What we're actually looking for here is to see whether there is functionality not possible without this API.
| Assignee | ||
Comment 3•3 years ago
•
|
||
(In reply to Rob Wu [:robwu] from comment #2)
What are the use cases for this API? What we're actually looking for here is to see whether there is functionality not possible without this API.
I wrote this patch because my school uses ProctorU. ProctorU is very common (in the United States, at least) and I do think web compatibility is enough of a justification. I can try to think of some use cases, let's see:
- An extension could decide whether or not to do some memory intensive operation based on this info. e.g. If the user only has 4 gigabytes of ram, use the disk instead of memory to prevent crashing the browser.
- An extension could use this information to tune heuristics for when to flush a cache.
- I could see this being useful for extensions that maintain a lot of state (I'm vaguely imagining something with video) that want to decide if they should recompute that state or store it in memory. (Service workers/non-persistent background pages).
- There's probably someone out there that wants/needs to aggressively reduce Firefox's memory usage. So I can imagine someone creating an extension that uses this info to augment the existing memory unload heuristics built into Firefox and discard tabs. Imaginary scenario (involves bug 1809094): An extension that adds a tab context menu item to prevent unloading of a tab. This extension includes ability to optionally ignore the user, and reset their choice, if
availableCapacityis below some arbitrary number.
That said, I'm not a creative person at all, and it's possible I'm missing some obvious use case.
Updated•3 years ago
|
Description
•