Sitelet https://github.com/flutter/flutter/pull/190861
Skip to content

Adds benchmark for windows shadow text. - #190861

Merged
auto-submit[bot] merged 3 commits into
flutter:masterfrom
gaaclarke:text-shadow-win-benchmark
Aug 11, 2026
Merged

auto-submit[bot] merged 3 commits into
flutter:masterfrom
gaaclarke:text-shadow-win-benchmark

Conversation

@gaaclarke

@gaaclarke gaaclarke commented Aug 10, 2026 •

Copy link
Copy Markdown
Member

issue #190395

test results on macos

Metric Stock Engine (host_profile) Patched Engine (text-shadow-cache-by-content) Improvement
Average Raster Time 6.82 ms 1.11 ms ~6.1x faster
90th Percentile Raster Time 8.66 ms 1.72 ms ~5.0x faster
99th Percentile Raster Time 9.73 ms 2.53 ms ~3.8x faster
Worst Frame Raster Time 10.14 ms 2.67 ms ~3.8x faster

The patch is from #190681

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

If this change needs to override an active code freeze, provide a comment explaining why. The code freeze workflow can be overridden by code reviewers. See pinned issues for any active code freezes with guidance.

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Aug 10, 2026
@github-actions github-actions Bot added the a: text input Entering text in a text field or keyboard related problems label Aug 10, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new macrobenchmark, text_shadow_perf, to measure text shadow scrolling performance, along with its corresponding Windows devicelab task and CI configuration. Feedback was provided to add a documentation comment to the newly introduced public function createTextShadowPerfTest in perf_tests.dart to comply with the repository's style guide.

Comment thread dev/devicelab/lib/tasks/perf_tests.dart
gaaclarke and others added 2 commits August 10, 2026 11:22
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@gaaclarke
gaaclarke requested review from andywolff and b-luk August 10, 2026 21:01

@andywolff andywolff left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gaaclarke gaaclarke added the autosubmit Merge PR when tree becomes green via auto submit App label Aug 10, 2026
@gaaclarke gaaclarke mentioned this pull request Aug 10, 2026
10 tasks done
@auto-submit
auto-submit Bot added this pull request to the merge queue Aug 11, 2026
Merged via the queue into flutter:master with commit da7fe06 Aug 11, 2026
23 checks passed
@flutter-dashboard flutter-dashboard Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Aug 11, 2026
pull Bot pushed a commit to TheRakeshPurohit/flutter that referenced this pull request Aug 12, 2026
fixes flutter#190395

This replaces `TextShadowCacheKey::identifier`, which was a cast of the
TextFrame pointer, with a content aware fingerprint. This allows cache
hits across frames. It also removes the possible error where the pointer
is recycled for a different TextFrame on the next frame.

The fingerprint approach was chosen over storing a shared_ptr to a
TextFrame and performing equality checks on it. The fingerprint avoids
shared_ptr and indirection overhead in the TextShadowCacheKey. Instead
of just relying on the hash we added extra fields to create the full
fingerprint to make the probability of a false cache essentially zero
(the texts on the same frame would have to have the same length, start,
end, and hash code to create a false cache hit).

I measured this locally with a windows machine with the reproduction
from flutter#190395, after this the
shadowed text frames measure the same as the non-shadowed text frames.

flutter#190861 adds a benchmark, the PR
was measured on macos with that benchmark as well.

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [AI contribution guidelines] and understand my
responsibilities, or I am not using AI tools.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

If this change needs to override an active code freeze, provide a
comment explaining why. The code freeze workflow can be overridden by
code reviewers. See pinned issues for any active code freezes with
guidance.

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[AI contribution guidelines]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#ai-contribution-guidelines
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
pull Bot pushed a commit to Superoldman96/flutter that referenced this pull request Aug 19, 2026
…ter#191010)

Removes bringup:true from the text shadow benchmark from
flutter#190861

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [AI contribution guidelines] and understand my
responsibilities, or I am not using AI tools.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

If this change needs to override an active code freeze, provide a
comment explaining why. The code freeze workflow can be overridden by
code reviewers. See pinned issues for any active code freezes with
guidance.

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[AI contribution guidelines]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#ai-contribution-guidelines
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: text input Entering text in a text field or keyboard related problems CICD Run CI/CD

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants