Bug 257622

Summary: Add a way to run incremental GC sweeps during runloop idle time in between rendering updates
Product: WebKit Reporter: Wenson Hsieh <wenson_hsieh>
Component: JavaScriptCoreAssignee: Wenson Hsieh <wenson_hsieh>
Status: RESOLVED FIXED    
Severity: Normal CC: jarred, mark.lam, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 257650, 258032    
Bug Blocks:    

Wenson Hsieh
Reported 2023-06-01 14:37:42 PDT
.
Attachments
Jarred Sumner
Comment 1 2023-06-01 14:57:58 PDT
We had a similar issue in Bun and ended up doing this: https://github.com/oven-sh/bun/blob/4378ef8e97839f950ddfa180e466d0a8db187681/src/bun.js/event_loop.zig#L320 Just before the event loop idles, we check if the heap size changed since the previous check and if so, we schedule the garbage collector asynchronously. Then every so often we run a synchronous GC It fixed issues where Bun’s memory usage permanently would go up. But we still have issues with synchronous work. It doesn’t go down much if you do lots of blocking synchronous work
Radar WebKit Bug Importer
Comment 2 2023-06-08 14:38:23 PDT Comment hidden (obsolete)
Mark Lam
Comment 3 2023-06-12 22:53:20 PDT
Wenson Hsieh
Comment 4 2023-06-13 21:09:25 PDT
EWS
Comment 5 2023-06-15 07:56:21 PDT
Committed 265197@main (1a501dce9fa2): <https://commits.webkit.org/265197@main> Reviewed commits have been landed. Closing PR #14945 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.