Commit 29f35b2
committed
perf(formatter): reuse previous indent stack in
As said in https://github.com/oxc-project/oxc/blob/60848996f81a4d9808a0b5788cc225f10e524971/crates/oxc_formatter/src/formatter/printer/mod.rs#L703-L708
These four stacks should be reused in each FitsMeasurer run to avoid reallocation, but `fits_indent_stack` and `fits_stack_tem_indent are lacking.
<img width="1268" height="434" alt="image" src="https://github.com/user-attachments/assets/43aeb36e-4c34-4fc9-8786-c45e353386aa" />FitsMeasurer (#15416)1 parent 2c6bd9e commit 29f35b2
File tree
2 files changed
+10
-0
lines changed- crates/oxc_formatter/src/formatter/printer
2 files changed
+10
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
299 | 299 | | |
300 | 300 | | |
301 | 301 | | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
302 | 306 | | |
303 | 307 | | |
304 | 308 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1203 | 1203 | | |
1204 | 1204 | | |
1205 | 1205 | | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
1206 | 1212 | | |
1207 | 1213 | | |
1208 | 1214 | | |
| |||
0 commit comments