Open
Bug 813530
Opened 12 years ago
Updated 2 years ago
Add low memory event for JS content
Categories
(Core :: DOM: Core & HTML, enhancement)
Core
DOM: Core & HTML
Tracking
()
NEW
People
(Reporter: jgilbert, Unassigned)
References
(Blocks 1 open bug)
Details
(Whiteboard: [games:p?])
I could be very useful to web apps to know when we are using too much memory, such that we're at risk of being killed.
One idea is to provide a 'low memory' event via a JS page event, which could allow an app to free any spare memory and/or scale back its memory usage. An app could unlink spare objects it doesn't need anymore. After returning from this event, JS could GC/CC (as normal for memory pressure events, I think) to free whatever memory the page could spare.
With this API, a page would be able to respond to dangerous levels of memory use. Currently, if an app uses a lot of memory on mobile, it risks the OS axing the browser for using too much memory.
Reporter | ||
Updated•12 years ago
|
Whiteboard: [games:p?]
Yeah, good idea; we already have some of the data, so we should be able to expose it to web apps. Useful for more than just games, too.
Whiteboard: [games:p?] → [games:p2]
Updated•11 years ago
|
Blocks: gecko-games
Comment 2•11 years ago
|
||
It'd be good to check with other browsers on standard mailing-lists before proceeding.
The WHATWG mailing list sounds like a good fit for this sort of feature.
http://lists.whatwg.org/listinfo.cgi/whatwg-whatwg.org
Comment 3•11 years ago
|
||
Low memory notifications would also be useful for B2G apps.
Whiteboard: [games:p2] → [games:p?]
Updated•2 years ago
|
Severity: normal → S3
Updated•2 years ago
|
Component: General → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•