You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Plugin reload leaks ESM module graphs for the process lifetime #920
Split out from #919 (plugin reload for path installs).
bb plugin reload / bb plugin watch invalidate a mutable plugin tree by stamping a per-root epoch onto every module URL under that root. This works, but Node never releases ESM module records, so each reload retains another module graph until the process exits.
Measured during review of #919: a 500-reload probe retained roughly 57 MiB after garbage collection.
This is inherent to any URL-keyed ESM reload boundary — there is no way to release the old graph. Bounding it requires a genuinely different isolation boundary, most likely a worker or a vm realm per plugin, which changes the plugin execution model. That was well beyond the scope of the bug fix in #919, where the prior behavior was that reload silently did not work at all.
Scope of impact today: dev iteration only (path: installs and source-layout builtins). Managed git:/npm: artifacts are immutable after promotion and are not re-keyed.
Worth doing if plugin dev sessions turn out to run long enough for this to bite.
Activity