The Wire · Showcase
NODE CORE PERF: 10-20% EVENTTARGET SPEEDUP LANDS
By RepoJournal · Filed · About Node.js
EventTarget just got 10-20% faster in the benchmark, and recursive readdir drops the per-entry stat() overhead.
The big win this morning is in nodejs/node: a hybrid dispatch closure for events was inlined, removing closure overhead and unlocking a 10-20% gain in the eventtarget.js benchmark [1]. Just as valuable for filesystem-heavy work, `fs.readdir()` and friends with `{ recursive: true }` now use the entry types the binding already returns instead of a `stat()` per entry [2]. Meanwhile, the snapshot machinery gets a significant upgrade: `CreateForSnapshotting()` can now build on a V8 startup blob, fixing a gap that blocked Chromium-style embedders from using `node_mksnapshot` at all [3]. On the tooling side, node-gyp hardened its CI with a zizmor security linter for GitHub Actions [4] and stopped ruff from formatting GYP example code in markdown, keeping docs stable [5]. Undici quietly fixed a nasty leak: when SOCKS5 negotiation times out, the socket now gets destroyed instead of staying open for the lifetime of the process [6]. All told, 20 commits and 10 PRs across four repos, and the signal is clear: core perf and proxy reliability are trending up.
One email a day. Unsubscribe in one click.
Keep up with Node.js in about 3 minutes a day: what actually shipped — the commits, pull requests, releases, and security advisories that matter.
One email a day. Unsubscribe in one click. Read a past issue →
Action items
- → Benchmark your EventTarget-heavy code against Node main to capture the 10-20% win nodejs/node [plan]
- → Upgrade to a build that includes the recursive readdir fix to avoid per-entry stat() overhead nodejs/node [plan]
- → Watch for the SOCKS5 fix in undici releases to avoid socket leaks in long-running processes nodejs/undici [monitor]
References
- [1] events: inline iterationCondition hybrid dispatch closure nodejs/node
- [2] fs: stop stat()ing every entry in recursive readdir ↗ nodejs/node
- [3] src: allow building the snapshot on top of a V8 startup blob ↗ nodejs/node
- [4] fix(ci): add zizmor security linter for github actions ↗ nodejs/node-gyp
- [5] fix(ci): do not ruff format gyp example code in markdown files ↗ nodejs/node-gyp
- [6] fix(socks5-proxy-agent): destroy socket when negotiation times out ↗ nodejs/undici