LibGC: Implement incremental garbage collection#8913
LibGC: Implement incremental garbage collection#8913marcbutler wants to merge 1 commit intoLadybirdBrowser:masterfrom
Conversation
|
@marcbutler have you tried running the whole https://github.com/LadybirdBrowser/js-benchmarks/ with and without these changes? So we can see the performance impact of it in the individual tests. |
@jdahlin No I have not but I will look into doing so. I have only just got it working, and wanted to get feedback as early as possible. I do not anticipate an improvement in performance. The incremental collector with the right tuning should smooth out collection pauses, but I suspect the write barriers overhead will reduce performance. |
|
Hello! One or more of the commit messages in this PR do not match the Ladybird code submission policy, please check the |
1b7b46e to
3cd652f
Compare
Convert collector to run incrementally using tricolor marking and a hybrid of Yuasa (SATB, deletion) and Dijkstra (insertion) write barriers that shade both old and new targets gray. Marking and sweeping budgets specified in cells, and blocks respectively. Budgets are currently arbitrary but can be tuned with an ini file. This code is more than proof-of-concept but unrefined.
772bfa8 to
8361090
Compare
|
Hello! Thanks for posting this for early feedback. This is an unusually broad and correctness-sensitive change set: it changes LibGC’s marking model, adds write barriers across a large number of LibJS mutation sites, changes weak/finalization behavior, and also reaches into the event loop and LibWeb. Given that scope, I think the patch needs three things before it can be reviewed usefully:
Without that, it is hard to distinguish a promising prototype from a patch that only appears coherent at a high level. |
Convert collector to run incrementally, using standard tricolor marking and a hybrid of Yuasa (SATB, deletion) and Dijkstra (insertion) write barriers that shade both old and new targets gray.
Marking and sweeping budgets specified in cells, and blocks respectively, and there has been no attempt to tune either.
This code is more than a proof-of-concept, but lacks refinement.