next.js
68899474 - perf: reduce buffered transform copies in node streams

Commit
45 days ago
perf: reduce buffered transform copies in node streams Context: - Avoid repeated Buffer.concat in createBufferedTransformNode by buffering chunks and flushing once. - Keep callback timing unchanged while reducing per-chunk allocation overhead. Benchmark (micro scenario, 300 iterations, 30 warmup, parent-file swap): - createBufferedTransformNode only median: 0.070ms -> 0.052ms (+26.85% faster) - Node continueDynamicHTMLResume median: 0.657ms -> 0.571ms (+13.01% faster) - Node continueStaticPrerender median: 0.609ms -> 0.611ms (-0.40%)
Author
Committer
Parents
Loading