| name | optimizing-node-native-performance |
| description | Audits Node addon and native-boundary performance. |
| metadata | {"internal":true} |
Optimizing Node Native Performance
Measure module startup/import separately from steady state, and identify conversion, copy,
boundary, queueing, or native-loop cost before adopting a .node addon or changing one.
- Read the shared Node native-boundary audit.
- Batch data into typed buffers or a versioned compact layout; do not cross the boundary
per character, token, AST node, callback, or tiny result.
- Use Node-API by default for ABI stability. Treat direct V8 fast APIs as version-specific
experiments with a supported fallback.
- Define ownership/finalization for every externally backed buffer and test Worker cleanup.
- Preserve event-loop responsiveness and compare the end-to-end JS baseline.
For Wasm memory and feature variants, use
optimizing-webassembly-performance.