Skip to content

perf(formatter): optimize FormatElement::Token printing#15365

Merged
graphite-app[bot] merged 1 commit intomainfrom
11-06-perf_formatter_optimize_formatelement_token_printing
Nov 7, 2025
Merged

perf(formatter): optimize FormatElement::Token printing#15365
graphite-app[bot] merged 1 commit intomainfrom
11-06-perf_formatter_optimize_formatelement_token_printing

Conversation

@Dunqing
Copy link
Member

@Dunqing Dunqing commented Nov 6, 2025

FormatElement::Token is ASCII-only and does not contain line breaks or tab characters, so we can skip the \n check and simplify the logic of getting FormatElement::Token length

@github-actions github-actions bot added A-formatter Area - Formatter C-performance Category - Solution not expected to change functional behavior, only performance labels Nov 6, 2025
Copy link
Member Author

Dunqing commented Nov 6, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

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-hq
Copy link

codspeed-hq bot commented Nov 6, 2025

CodSpeed Performance Report

Merging #15365 will not alter performance

Comparing 11-06-perf_formatter_optimize_formatelement_token_printing (c18f154) with 11-06-refactor_formatter_rename_formatelement_statictext_and_formatelement_dynamictext_to_formatelement_token_and_formatelement_text (e4faa85)

Summary

✅ 33 untouched
⏩ 4 skipped1

Footnotes

  1. 4 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.

@Dunqing Dunqing force-pushed the 11-06-refactor_formatter_rename_formatelement_statictext_and_formatelement_dynamictext_to_formatelement_token_and_formatelement_text branch from d08415c to c825305 Compare November 6, 2025 06:49
@Dunqing Dunqing force-pushed the 11-06-perf_formatter_optimize_formatelement_token_printing branch from f3449e0 to 073c27b Compare November 6, 2025 06:49
@Dunqing Dunqing force-pushed the 11-06-perf_formatter_optimize_formatelement_token_printing branch from 073c27b to c18f154 Compare November 6, 2025 07:20
@Dunqing Dunqing force-pushed the 11-06-refactor_formatter_rename_formatelement_statictext_and_formatelement_dynamictext_to_formatelement_token_and_formatelement_text branch from c825305 to e4faa85 Compare November 6, 2025 07:20
@Dunqing Dunqing marked this pull request as ready for review November 7, 2025 01:05
@graphite-app graphite-app bot added the 0-merge Merge with Graphite Merge Queue label Nov 7, 2025
@graphite-app
Copy link
Contributor

graphite-app bot commented Nov 7, 2025

Merge activity

`FormatElement::Token` is ASCII-only and does not contain line breaks or tab characters, so we can skip the `\n` check and simplify the logic of getting `FormatElement::Token` length
@graphite-app graphite-app bot force-pushed the 11-06-refactor_formatter_rename_formatelement_statictext_and_formatelement_dynamictext_to_formatelement_token_and_formatelement_text branch from e4faa85 to f90e515 Compare November 7, 2025 01:18
@graphite-app graphite-app bot force-pushed the 11-06-perf_formatter_optimize_formatelement_token_printing branch from c18f154 to 98c9234 Compare November 7, 2025 01:19
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Nov 7, 2025
Base automatically changed from 11-06-refactor_formatter_rename_formatelement_statictext_and_formatelement_dynamictext_to_formatelement_token_and_formatelement_text to main November 7, 2025 01:26
@graphite-app graphite-app bot added the 0-merge Merge with Graphite Merge Queue label Nov 7, 2025
@graphite-app graphite-app bot merged commit 98c9234 into main Nov 7, 2025
21 checks passed
@graphite-app graphite-app bot deleted the 11-06-perf_formatter_optimize_formatelement_token_printing branch November 7, 2025 01:33
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Nov 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-formatter Area - Formatter C-performance Category - Solution not expected to change functional behavior, only performance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant