Investigate deleting merged compartments immediately

RESOLVED FIXED in Firefox 56

Status

()

enhancement
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: jonco, Assigned: jonco)

Tracking

55 Branch
mozilla56
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox56 fixed)

Details

Attachments

(1 attachment)

When we parse a script off main thread we create a new ZoneGroup, Zone and JSComparment for the parse to happen in.  When it finishes all the GC things in the new compartment are merged back into the main heap.  The group, zone and compartment data structures are no longer required but are not cleaned up until the next GC.  Since we may build up a lot of these if we're parsing lots of scripts it may be better to just delete them immediately we're finished with them.
It's worse than I said above - we won't collect these until the next *full* GC, and we're trying to do fewer of those.  Since we iterate over all zones in a whole lot of places it would be better to clean these up ASAP.
Assignee: nobody → jcoppeard
Attachment #8888856 - Flags: review?(sphink)
Attachment #8888856 - Flags: review?(sphink) → review+
Pushed by jcoppeard@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/451efff6cf90
Delete parsing zones immediately after their contents are merged r=sfink
https://hg.mozilla.org/mozilla-central/rev/451efff6cf90
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
Depends on: 1384047
You need to log in before you can comment on or make changes to this bug.