perf(formatter): optimize formatting of JSX element/fragment with a single child#16631
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. |
CodSpeed Performance ReportMerging #16631 will not alter performanceComparing Summary
Footnotes
|
8d58f68 to
c17b3d4
Compare
53474e3 to
e739576
Compare
c17b3d4 to
02172b8
Compare
e739576 to
64adcd2
Compare
02172b8 to
b3581c8
Compare
6515f47 to
bc98c23
Compare
Merge activity
|
…ingle child (#16631) Add `FormatSingleChild` for optimizing JSX elements/fragments with a single meaningful child. When there is only a single child, we do not need to write the child into a temporary buffer and then take it when formatting. Instead, we can directly write the child into the root buffer. Also, this can avoid calling costly `best_fitting!` formatting in some situations.
b3581c8 to
4843475
Compare
bc98c23 to
c7db70b
Compare
…ingle child (#16631) Add `FormatSingleChild` for optimizing JSX elements/fragments with a single meaningful child. When there is only a single child, we do not need to write the child into a temporary buffer and then take it when formatting. Instead, we can directly write the child into the root buffer. Also, this can avoid calling costly `best_fitting!` formatting in some situations.
…ingle child (oxc-project#16631) Add `FormatSingleChild` for optimizing JSX elements/fragments with a single meaningful child. When there is only a single child, we do not need to write the child into a temporary buffer and then take it when formatting. Instead, we can directly write the child into the root buffer. Also, this can avoid calling costly `best_fitting!` formatting in some situations.

Add
FormatSingleChildfor optimizing JSX elements/fragments with a single meaningful child.When there is only a single child, we do not need to write the child into a temporary buffer and then take it when formatting. Instead, we can directly write the child into the root buffer.
Also, this can avoid calling costly
best_fitting!formatting in some situations.