Hi Erik, Both of those docs are a decent enough reflection of what we ended up doing. The purpose of PersistentHandles is to transfer ownership of a block of handles between threads -- you can think of it as a more efficient, single-owner block of global handles, which are expected to persist to the main thread (hence the name) after a background thread compilation completes. The PersistentHandlesScope is effectively a convenience scope to allow us to create Handles inside that scope using normal factory and Handle allocation methods, without needing to manually pass in which handle backing they need to go into.
I'd be interested to hear more about your plans to make HandleScopes more efficient though, they're still a performance pain point. - Leszek On Wednesday, July 30, 2025 at 12:45:10 PM UTC+2 Erik Corry wrote: https://docs.google.com/document/d/1qVFbzenbzOIGsVC3PSP6fe_RQD0R4YwwQKcZYLyVtQ4/edit This document from 2020 has no comments and no LGTMs, but it was referenced from commits. Were the proposals accepted in this approximate form, or is it a proposal that didn't get implemented in this form? A different document, "Handles and Local Heaps" https://docs.google.com/document/d/17yKs-6apE2rGEag7tDsoyeRxg99c1dXyXQ2MfHe65tY/edit?tab=t.0 is from the same period and has more engagement. I'm looking into making handles and scopes more efficient (by having linear backing areas with no limit checks), and the PersistentHandlesScope complicates this quite a lot, so I'm trying to understand the issues it solves. -- Erik -- -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev --- You received this message because you are subscribed to the Google Groups "v8-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/v8-dev/05027c6a-59ae-4755-8272-3517e1ba195dn%40googlegroups.com.
