next.js
e01d3f2e - Turbopack: perf: Avoid clones in RopeReader (#86708)

Commit
24 days ago
Turbopack: perf: Avoid clones in RopeReader (#86708) We (unsurprisingly) spend a lot of time encoding `Rope`s. Most of this is in `memcpy`ing the data out of the rope (not easy to optimize), but there's some cloning of refcounted `Bytes` containers here that can be easily avoided. Yes, `Bytes`​ is refcounted, but updating refcounts isn't free, and it matters because this is a hot codepath. This is too small to show up on any top-line measurement (<1%) of total time, but should still be an improvement.
Author
bgw bgw
Parents
Loading