refactor(formatter): check whether BlockIndent's content is empty in debug mode#16437
Merged
graphite-app[bot] merged 1 commit intomainfrom Dec 4, 2025
Conversation
Member
Author
CodSpeed Performance ReportMerging #16437 will not alter performanceComparing Summary
Footnotes
|
d254ac1 to
da1502f
Compare
This was referenced Dec 4, 2025
Merged
This was referenced Dec 4, 2025
leaysgur
approved these changes
Dec 4, 2025
Member
leaysgur
left a comment
There was a problem hiding this comment.
Please let me know if my understanding is wrong:
We can remove snapshot here because empty check is already done before.
Contributor
Merge activity
|
…debug mode (#16437) Using `snapshot` to handle empty content is not ideal because it has a slight overhead. Additionally, it should report immediately that there is empty content rather than silencing it, so that we can improve the code to avoid unnecessary logic.
graphite-app bot
pushed a commit
that referenced
this pull request
Dec 4, 2025
…6432) Prepare for #16437. Early return can avoid unnecessary execution operations A few percentage performance improvements surprised me. <img width="1333" height="785" alt="image" src="https://github.com/user-attachments/assets/87f97cac-a9ae-436b-add4-fb9fc4f1b0e4" />
30026b2 to
6296b18
Compare
da1502f to
62330df
Compare
graphite-app bot
pushed a commit
that referenced
this pull request
Dec 4, 2025
After #16437, there are no usages of `BufferSnapshot`.
Base automatically changed from
12-03-refactor_formatter_avoid_formatting_empty_vec_ast
to
main
December 4, 2025 07:38
taearls
pushed a commit
to taearls/oxc
that referenced
this pull request
Dec 11, 2025
…c-project#16432) Prepare for oxc-project#16437. Early return can avoid unnecessary execution operations A few percentage performance improvements surprised me. <img width="1333" height="785" alt="image" src="https://github.com/user-attachments/assets/87f97cac-a9ae-436b-add4-fb9fc4f1b0e4" />
taearls
pushed a commit
to taearls/oxc
that referenced
this pull request
Dec 11, 2025
taearls
pushed a commit
to taearls/oxc
that referenced
this pull request
Dec 11, 2025
…debug mode (oxc-project#16437) Using `snapshot` to handle empty content is not ideal because it has a slight overhead. Additionally, it should report immediately that there is empty content rather than silencing it, so that we can improve the code to avoid unnecessary logic.
taearls
pushed a commit
to taearls/oxc
that referenced
this pull request
Dec 11, 2025
… content is passed in (oxc-project#16475) This is for oxc-project#16474, similar to oxc-project#16437, but for `Indent`.
taearls
pushed a commit
to taearls/oxc
that referenced
this pull request
Dec 11, 2025
After oxc-project#16437, there are no usages of `BufferSnapshot`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Using
snapshotto handle empty content is not ideal because it has a slight overhead. Additionally, it should report immediately that there is empty content rather than silencing it, so that we can improve the code to avoid unnecessary logic.