Skip to content

Don't track live pointers anymore#282

Closed
szegedi wants to merge 1 commit intomainfrom
szegedi/no-live-tracking
Closed

Don't track live pointers anymore#282
szegedi wants to merge 1 commit intomainfrom
szegedi/no-live-tracking

Conversation

@szegedi
Copy link

@szegedi szegedi commented Feb 20, 2026

Just testing if live tracking of pointers is still necessary now that we use Node::ObjectWrap with PersistentContextPtr.

@szegedi szegedi added the semver-patch Bug or security fixes, mainly label Feb 20, 2026
@github-actions
Copy link

Overall package size

Self size: 1.86 MB
Deduped: 2.23 MB
No deduping: 2.23 MB

Dependency sizes | name | version | self size | total size | |------|---------|-----------|------------| | source-map | 0.7.6 | 185.63 kB | 185.63 kB | | pprof-format | 2.2.1 | 163.06 kB | 163.06 kB | | p-limit | 3.1.0 | 7.75 kB | 13.78 kB | | node-gyp-build | 3.9.0 | 8.81 kB | 8.81 kB |

🤖 This report was automatically generated by heaviest-objects-in-the-universe

@pr-commenter
Copy link

pr-commenter bot commented Feb 20, 2026

Benchmarks

Benchmark execution time: 2026-02-20 11:19:59

Comparing candidate commit 401b26c in PR branch szegedi/no-live-tracking with baseline commit a2649a6 in branch main.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 88 metrics, 32 unstable metrics.

@szegedi
Copy link
Author

szegedi commented Feb 20, 2026

Verdict: it is, ASAN still shows memory leaks if I try to remove live pointer tracking. Good to know. I was worried that we might have a double attempt at a release if a PCP wrapped in a JS object outlives the WallProfiler instance (first, it gets deleted in ~WallProfiler, then it gets deleted when the JS wrapper gets garbage collected), but it unfortunately doesn't happen as when ~WallProfiler deletes the PCP, it fortunately deregisters its wrapper from a GC callback, so all is well. We still need tracking of lives in WallProfiler though, as otherwise we leak if the V8 engine is shut down (typically, on worker threads), as that'll not invoke the GC callbacks on all objects that were live on shutdown.

@szegedi szegedi closed this Feb 20, 2026
@szegedi szegedi deleted the szegedi/no-live-tracking branch February 20, 2026 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver-patch Bug or security fixes, mainly

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant