perf(formatter_core): share one thread-cached scratch vector across staging buffers#24583
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
Merging this PR will not alter performance
Comparing Footnotes
|
aa1921c to
12a1158
Compare
72ae10f to
c835270
Compare
c835270 to
7aa30a3
Compare
12a1158 to
8039aca
Compare
8039aca to
c880bce
Compare
7aa30a3 to
a9a2c78
Compare
c880bce to
d7cedab
Compare
a9a2c78 to
c3b460b
Compare
Merge activity
|
d7cedab to
c191f51
Compare
c3b460b to
7810e8a
Compare
Revert #24583. After re-measuring, I found no significant improvement. It is not worth the amount of code required. Also, the fundamental issue is that the end-side formatter, rather than Oxfmt itself, is performing cross-file caching, which is an undesirable side effect.

Apply #24539, share
ScratchBuffer's buffer.NOTE: checked-in vectors keep their high-water capacity for the thread's lifetime (same policy as #24539). This is ~KB for regular sources, and fine.