Open Bug 1560543 Opened 5 years ago Updated 2 years ago

Investigate how to trigger GC less often after CC

Categories

(Core :: DOM: Core & HTML, enhancement, P3)

enhancement

Tracking

()

People

(Reporter: smaug, Unassigned)

Details

Attachments

(1 obsolete file)

No description provided.

The patch without magical 1.5 multiplier doesn't end up triggering GC pretty much ever, but then GC will often get called soon because of TOO_MUCH_MALLOC or INCREMENTAL_ALLOC_TRIGGER or some such.

Aha, and that magical multiplier seems to be needed because there is some other multiplier used for zones,
https://searchfox.org/mozilla-central/rev/da14c413ef663eb1ba246799e94a240f81c42488/js/src/gc/GC.cpp#298-299

Ok, perhaps I should have tried do something closer to what maybeMallocTriggerZoneGC does

I'm wondering whether we need something like MaybeGC that works for all zones and takes a multiplier parameter.

I like the idea of having a threshold value that is compared against current usage * some factor, and varying the factor according to current circumstances. This can be used to make GC more likely in some places (like here) and to discourage GC in other places where it's not convenient.

Updated the patch to use a bit different multipliers.
It is going through all the relevant zones to see if there is at least some reasonable amount of data to collect.

Attachment #9073213 - Attachment is obsolete: true
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: