Skip to content

[web_benchmarks] Fix benchmark stalling when only repainting views that are dirty - #13089

Merged
auto-submit[bot] merged 8 commits into
flutter:mainfrom
knopp:fix_benchmark
Nov 10, 2026
Merged

auto-submit[bot] merged 8 commits into
flutter:mainfrom
knopp:fix_benchmark

Conversation

@knopp

@knopp knopp commented Oct 1, 2026

Copy link
Copy Markdown
Member

This is required in order to reland flutter/flutter#192128. Fixes flutter/flutter#193295.

The code is little bit hairy because current stable does not have RenderView.markNeedsCompositeFrame. I will clean it up when that changes.

Pre-Review Checklist

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

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.

Footnotes

  1. Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. ↩ ↩2

@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Oct 1, 2026
@flutter-dashboard

Copy link
Copy Markdown

It looks like this pull request may not have tests. Please make sure to add tests or get an explicit test exemption before merging.

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. If you believe this PR qualifies for a test exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group.

@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 adds a workaround in _RecordingWidgetsBinding.handleDrawFrame that dynamically calls markNeedsCompositeFrame() on each RenderView to prevent the recorder from stalling. The feedback suggests adding an ignore comment for the avoid_dynamic_calls linter rule to prevent potential static analysis failures.

@loic-sharma loic-sharma left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, but would it be possible to add a unit test for this scenario?

@loic-sharma

loic-sharma commented Oct 1, 2026 •

Copy link
Copy Markdown
Member

Reason for adding the override: no versioning needed label: this change is intended to be a no-op to prepare for a breaking change in Flutter to maintain existing behavior. It does not add nor change any APIs.

EDIT: Scratch that, we should publish a new version. See the comment below.

@loic-sharma loic-sharma added override: no versioning needed Override the check requiring version bumps for most changes and removed override: no versioning needed Override the check requiring version bumps for most changes labels Oct 1, 2026
@loic-sharma

Copy link
Copy Markdown
Member

@knopp Would you mind bumping the version so that we publish a new package version? @elliette bubbled up that some projects, like DevTools, depend on web_benchmarks and run on Flutter's main channel. DevTools will need to bump their version of web_benchmarks to support the latest Flutter main.

@elliette elliette left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM once the versioning and tests are updated. Thank you!

@knopp

This comment was marked as off-topic.

@knopp
knopp force-pushed the fix_benchmark branch 2 times, most recently from e2f652e to 739fe68 Compare October 14, 2026 18:16
@jmagman

jmagman commented Oct 26, 2026

Copy link
Copy Markdown
Member

@knopp can this be merged?

@elliette elliette added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 10, 2026
@elliette elliette changed the title Fix benchmark stalling when only repainting views that are dirty [web_benchmarks] Fix benchmark stalling when only repainting views that are dirty Nov 10, 2026
@auto-submit
auto-submit Bot merged commit 2c1c1bd into flutter:main Nov 10, 2026
13 checks passed
opensource-fork-sync Bot pushed a commit to cla7aye15I4nd/opensource-flutter__flutter that referenced this pull request Nov 11, 2026
…er#196381)

flutter/packages@08faf64...653628e

2026-11-11 [email protected] Roll Flutter from
fffd8c2 to b98afb5 (31 revisions) (flutter/packages#13623)
2026-11-11 [email protected] [material_ui] Document how to
programmatically clear DropdownMenu selection (flutter/packages#13266)
2026-11-11 [email protected] [pigeon] Fix basePath resolution when
paths share a string prefix with basePath (flutter/packages#13342)
2026-11-11 [email protected]
[cupertino_ui] Fix CupertinoSheetRoute throwing when a drag ends during
a pending relayout (flutter/packages#13316)
2026-11-11 [email protected] [shared_preferences] Updates Pigeon to
30.0.1 to support multi-engine registration and deregistration.
(flutter/packages#13617)
2026-11-11 [email protected]
[vector_graphics] Catch any throwable in useHtmlRenderObject() and cache
HTML fallback (flutter/packages#13545)
2026-11-11 [email protected] [cupertino_ui]
Include selectionHandleColor in NoDefaultCupertinoThemeData equality
(flutter/packages#13450)
2026-11-11 [email protected] [flutter_svg] Remove failed async loads
from Cache._pending (flutter/packages#13604)
2026-11-11 [email protected] [pigeon] Adds Native Interop FFI codec
serialization for NS types (flutter/packages#13616)
2026-11-10 [email protected] [pigeon] Support multi-engine Native
Interop registration and instance-aware unregistration
(flutter/packages#13576)
2026-11-10 [email protected] [image_picker_ios] Convert the
iOS example app and UI tests to Swift (flutter/packages#13570)
2026-11-10 [email protected]
[cupertino_ui] Localize CupertinoActionSheet semantics label
(flutter/packages#13377)
2026-11-10 [email protected] [camera_android]
Fix stopVideoRecording returning JPEG when takePicture runs during
recording (flutter/packages#13070)
2026-11-10 [email protected] [google_sign_in_android] Rename keep.xml
to google_sign_in_keep.xml (flutter/packages#13475)
2026-11-10 [email protected] [web_benchmarks] Fix benchmark stalling
when only repainting views that are dirty (flutter/packages#13089)
2026-11-10 [email protected] Roll Flutter from
d463821 to fffd8c2 (21 revisions) (flutter/packages#13614)

If this roll has caused a breakage, revert this CL and set the roller
to dry run mode using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC [email protected] on the revert to ensure that a
human
is aware of the problem.

To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App CICD Run CI/CD p: web_benchmarks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

web_benchmarks hang with latest Flutter

4 participants