refactor(oxfmt): handle gql-in-js by oxc_formatter_graphql#23319
Conversation
Merging this PR will improve performance by 4.92%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ⚡ | Simulation | formatter[errors.ts] |
613.7 µs | 571 µs | +7.48% |
| ⚡ | Simulation | isolated-declarations[vue-id.ts] |
52.8 ms | 49.7 ms | +6.26% |
| ⚡ | Simulation | formatter[handle-comments.js] |
2.9 ms | 2.8 ms | +4.16% |
| ⚡ | Simulation | formatter[index.tsx] |
3.9 ms | 3.8 ms | +3.49% |
| ⚡ | Simulation | formatter[core.js] |
1.6 ms | 1.6 ms | +3.27% |
Tip
Curious why this is faster? Comment @codspeedbot explain why this is faster on this PR, or directly use the CodSpeed MCP with your agent.
Comparing 06-10-refactor_oxfmt_handle_gql-in-js_by_oxc_formatter_graphql (72c79af) with 06-10-feat_oxfmt_format_parser_graphql_files_by_oxc_formatter_graphql (f1baa02)2
Footnotes
-
19 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩
-
No successful run was found on
06-10-feat_oxfmt_format_parser_graphql_files_by_oxc_formatter_graphql(8a37dfb) during the generation of this report, so d8de5f7 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩
ef8d246 to
16da3fc
Compare
324f25b to
722de94
Compare
a74bf8f to
a48a730
Compare
722de94 to
3638431
Compare
3638431 to
b7f2951
Compare
a48a730 to
9d2bc3d
Compare
b7f2951 to
7ae7015
Compare
9d2bc3d to
328ceef
Compare
7ae7015 to
faabba1
Compare
328ceef to
3c01b58
Compare
3596608 to
9fcdfd4
Compare
3cade3e to
72d6ff3
Compare
e8e75dd to
e95645e
Compare
e95645e to
ed1619f
Compare
3b3f0ae to
f1baa02
Compare
f1baa02 to
8a37dfb
Compare
ed1619f to
72c79af
Compare
Merge activity
|
- To use `oxc_formatter_graphql` in gql-in-js context, ground level refactoring was needed - Extracted common logic for handling embeddings into `oxc_formatter_core` - Updated other `xxx-in-js` callers to reflect these changes - Added a `format_to_ir()` method to each formatter in addition to the existing `format()` method
8a37dfb to
01de9ec
Compare
72c79af to
a7fd35e
Compare
- To use `oxc_formatter_graphql` in gql-in-js context, ground level refactoring was needed - Extracted common logic for handling embeddings into `oxc_formatter_core` - Updated other `xxx-in-js` callers to reflect these changes - Added a `format_to_ir()` method to each formatter in addition to the existing `format()` method

oxc_formatter_graphqlin gql-in-js context, ground level refactoring was neededoxc_formatter_corexxx-in-jscallers to reflect these changesformat_to_ir()method to each formatter in addition to the existingformat()method