Open Bug 1308403 Opened 8 years ago Updated 2 months ago

Investigate disabling Ion compilation while we're in a low memory situation

Categories

(Core :: JavaScript Engine: JIT, defect, P3)

defect

Tracking

()

People

(Reporter: jonco, Unassigned)

References

(Blocks 1 open bug)

Details

Ion compilation consumes a lot of memory in order to improve execution speed.  We could disable this while there is an ongoing low memory situation.
At the moment we receive a memory pressure event when the system enters a low memory state.  But I don't know if there's a way to tell when the situation changes and memory is available again.

gsvelto, do you know if there is a way to get an event when the low memory state ends too?  It sounds like there could be a tie-in here with the floating memory pressure trigger you mentioned in bug 1306128.
Flags: needinfo?(gsvelto)
Currently there's no way to tell when memory pressure is over and also we don't have a generic way of telling if memory pressure is ongoing or not (i.e. if the response from the previous memory pressure event had the desired effect or not).

Since I'm at it I'll add an event that indicates that memory pressure is over; it will be probably useful besides this use case.

Sadly enough we already had most of this in B2G-specific code but we never had the time to turn it into a generic facility.
No longer depends on: 1308118
Flags: needinfo?(gsvelto)
Priority: -- → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.