Open Bug 1065037 Opened 10 years ago Updated 2 years ago

Only do sweeping in the last phase

Categories

(Core :: JavaScript: GC, defect)

defect

Tracking

()

People

(Reporter: terrence, Unassigned)

References

(Blocks 1 open bug)

Details

If we finish marking and haven't done much work, we will move on to sweeping. Sweeping is generally much less incremental however, so it would be better for latency to never started sweeping unless sweeping was the first thing in a slice.
(In reply to Terrence Cole [:terrence] from comment #0) I think we already do something like this (see use of |lastMarkSlice| in jsgc.cpp). Note that there is always the chance that barriers will cause us to have new things to mark at the start of a slice for any zones which we have not started sweeping yet, so we could potentially wait forever for there to be nothing left to mark. Maybe we should delay sweeping if we have less than a certain fraction of our budget left.
(In reply to Jon Coppeard (:jonco) from comment #1) > Maybe we should delay sweeping if we have less than a certain fraction of > our budget left. That seems reasonable: sweep phase has some unavoidable costs up front and we should factor those in.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.