[ Tool ] Cleanup ResidentCompiler initialization logic#181421
[ Tool ] Cleanup ResidentCompiler initialization logic#181421auto-submit[bot] merged 4 commits intoflutter:masterfrom
ResidentCompiler initialization logic#181421Conversation
Moves the initialization logic for web and non-web compilers into the `ResidentCompiler` factory and reduces code duplication. Also bumps the flutter_tools Dart SDK version to ^3.10.0 to enable dot shorthands.
There was a problem hiding this comment.
Code Review
This pull request refactors the ResidentCompiler initialization by moving platform-specific logic into a new factory constructor. This is a great improvement for code organization and clarity. The changes are consistent across the codebase, and the use of modern Dart features is a welcome addition. I've identified a potential behavioral change for Fuchsia builds that needs attention, and a couple of minor documentation additions to align with the repository's style guide.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
| '-Ddart.vm.profile=false', | ||
| '-Ddart.vm.product=false', | ||
| '--enable-asserts', | ||
| '--track-widget-creation', | ||
| '--initialize-from-dill', | ||
| 'build/72879a0a1c6924a9ff6430cb690ed03a.cache.dill.track.dill', |
There was a problem hiding this comment.
We use this cached dill file when we try to launch the CFE with extra frontend options or Dart defines. If we don't provide them, we generate build/cache.dill or build/cache.dill.track.dill (if track widget creation is enabled) and pass them as --initialize-from-dill on subsequent runs. Otherwise, we prepend a hash of the options and defines to the generated dill file and use it on subsequent runs.
This needed to be added here due to some of the refactoring I did, since now initializeFromDill is being set in a different place and isn't null for the purposes of this test. The hash is stable though and doesn't rely on any non-deterministic state, so this is safe.
…:bkonyi/flutter into cleanup_resident_compiler_initialization
|
autosubmit label was removed for flutter/flutter/181421, because - The status or check suite Google testing has failed. Please fix the issues identified (or deflake) before re-applying this label. |
flutter/flutter@1d9d6a9...9eafba4 2026-02-01 [email protected] Roll Skia from a8ceddc2bca0 to 4ee9eb659ae0 (1 revision) (flutter/flutter#181773) 2026-02-01 [email protected] Roll Skia from a5a535bc21a3 to a8ceddc2bca0 (1 revision) (flutter/flutter#181772) 2026-02-01 [email protected] Roll Dart SDK from cde322c518b9 to 84abc8d58ec8 (1 revision) (flutter/flutter#181767) 2026-02-01 [email protected] Roll Dart SDK from c72b3f527a07 to cde322c518b9 (1 revision) (flutter/flutter#181763) 2026-01-31 [email protected] Roll Dart SDK from 43de79f08887 to c72b3f527a07 (1 revision) (flutter/flutter#181762) 2026-01-31 [email protected] Roll Fuchsia Linux SDK from 27OsrsrKcrr2pOaqY... to nI52U4LJMrBv8G1M9... (flutter/flutter#181760) 2026-01-31 [email protected] Roll Dart SDK from a0aac59705e5 to 43de79f08887 (1 revision) (flutter/flutter#181758) 2026-01-31 [email protected] Roll Skia from b704afbcd8e7 to a5a535bc21a3 (1 revision) (flutter/flutter#181757) 2026-01-31 [email protected] Roll Dart SDK from d6f77f9098e1 to a0aac59705e5 (1 revision) (flutter/flutter#181756) 2026-01-31 [email protected] Roll Skia from 6f9511ce11ba to b704afbcd8e7 (4 revisions) (flutter/flutter#181753) 2026-01-31 [email protected] Roll Dart SDK from 0cf997832948 to d6f77f9098e1 (2 revisions) (flutter/flutter#181749) 2026-01-31 [email protected] Roll Skia from 33c00c0f3b8b to 6f9511ce11ba (1 revision) (flutter/flutter#181744) 2026-01-31 [email protected] Roll Dart SDK from be3ffc51d407 to 0cf997832948 (1 revision) (flutter/flutter#181740) 2026-01-30 [email protected] Roll Skia from b62d43b59dd6 to 33c00c0f3b8b (1 revision) (flutter/flutter#181735) 2026-01-30 [email protected] [Impeller] Fix type conversion warnings seen on Windows when Impeller GL API wrappers log arguments with function types (flutter/flutter#181734) 2026-01-30 [email protected] Update New Android API Docs (flutter/flutter#180604) 2026-01-30 [email protected] Roll Fuchsia Linux SDK from isy1ARvK-3bsvtfc-... to 27OsrsrKcrr2pOaqY... (flutter/flutter#181733) 2026-01-30 [email protected] Fix P3-to-sRGB color conversion to operate in linear light (flutter/flutter#181720) 2026-01-30 [email protected] chore: deflake Linux_mokey flutter_engine_group_performance (flutter/flutter#181624) 2026-01-30 [email protected] Roll Dart SDK from 2703fd9733ce to be3ffc51d407 (1 revision) (flutter/flutter#181729) 2026-01-30 [email protected] Ensure content-sizing resize is run on UI thread (flutter/flutter#181686) 2026-01-30 [email protected] [ Tool ] Cleanup `ResidentCompiler` initialization logic (flutter/flutter#181421) 2026-01-30 [email protected] [native assets] Split debug info into `.dsym` files (flutter/flutter#181533) 2026-01-30 [email protected] Roll Skia from 4745eb2fe837 to b62d43b59dd6 (1 revision) (flutter/flutter#181727) 2026-01-30 [email protected] add ccache support for custom toolchain (flutter/flutter#180737) 2026-01-30 [email protected] update GLFW to latest and use EGL context creation on linux (flutter/flutter#181259) 2026-01-30 [email protected] add stacktrace support when requested for host builds (flutter/flutter#181264) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: 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
|
@bkonyi there seems to be a performance regression as a result of this PR, but we aren't quite sure what it means. Maybe you have an idea? Can you take a look please: |
Do you have steps to reproduce those results? I'm not quite sure how these results are obtained. |
Looks like a device lab test, you can start pulling the thread at ./dev/devicelab/bin/tasks/flutter_test_performance.dart |
`dev/devicelab/bin/task/flutter_test_performance.dart` regressed due to the CFE not being initialized with the correct dill file for the target test. This change updates `TestCompiler` to pass the correct dill file when creating the `ResidentCompiler` and adds a test to verify that the `ResidentCompiler` is initialized with the correct dill.
|
Thanks for sending this my way @gaaclarke! Fix is up for review here: #181826. |
`dev/devicelab/bin/task/flutter_test_performance.dart` regressed due to the CFE not being initialized with the correct dill file for the target test. This change updates `TestCompiler` to pass the correct dill file when creating the `ResidentCompiler` and adds a test to verify that the `ResidentCompiler` is initialized with the correct dill.
Roll Flutter from bf701fefec86 to f916dd6887bf (44 revisions) flutter/flutter@bf701fe...f916dd6 2026-02-05 [email protected] Implement macOS wide gamut (Display P3) support (flutter/flutter#181769) 2026-02-04 [email protected] Roll Skia from d23ecfbfdff9 to 8543ce512d5c (3 revisions) (flutter/flutter#181923) 2026-02-04 [email protected] Roll Dart SDK from 8001c99d952b to 8f778ffd318b (3 revisions) (flutter/flutter#181927) 2026-02-04 [email protected] Re-enable AddressSanitizer on the linux_unopt builder (flutter/flutter#181741) 2026-02-04 [email protected] Add exception to log message in ContentSizingFlag.java (flutter/flutter#181813) 2026-02-04 [email protected] Roll pub packages (flutter/flutter#181925) 2026-02-04 [email protected] [flutter_tools] Deprecate web hot reload flag (flutter/flutter#181884) 2026-02-04 [email protected] Marks platform_views_scroll_perf_impeller__timeline_summary unflaky (flutter/flutter#181649) 2026-02-04 [email protected] Roll Dart SDK from 204db085d970 to 8001c99d952b (1 revision) (flutter/flutter#181902) 2026-02-04 [email protected] Roll Skia from f37a22506eb4 to d23ecfbfdff9 (23 revisions) (flutter/flutter#181915) 2026-02-04 [email protected] In the Web codec tests, skip an undecodable image that is used to test a Skia error handling code path. (flutter/flutter#181870) 2026-02-04 [email protected] Roll Packages from 5b1bea8 to 3bddf2c (5 revisions) (flutter/flutter#181918) 2026-02-04 [email protected] Roll Fuchsia Linux SDK from UmQaaNuhkiuE8Dzug... to J2QdLcY2gyt4NP_xV... (flutter/flutter#181893) 2026-02-04 [email protected] Roll Dart SDK from 54322a0b1109 to 204db085d970 (3 revisions) (flutter/flutter#181890) 2026-02-04 [email protected] Cleanup cross imports (flutter/flutter#181807) 2026-02-04 [email protected] [Material] Remove Material import from backdrop_filter_test.dart widget tests (flutter/flutter#181386) 2026-02-04 [email protected] Move CheckedModeBanner tests to material and remove Material import from widgets banner_test (flutter/flutter#181261) 2026-02-04 [email protected] feat: Pass parameters from DropdownMenuFormField to DropDownMenu (flutter/flutter#181373) 2026-02-04 [email protected] Remove `Config complete` log when using `flutter build apk --config-only` (flutter/flutter#181864) 2026-02-04 [email protected] [Impeller] Fix flattening of very large zoomed curves with tiny stroke widths (flutter/flutter#181505) 2026-02-03 [email protected] Propagates Overlay's MediaQueryData to OverlayPortal child (flutter/flutter#181579) 2026-02-03 [email protected] Make sure that an AnimatedScale doesn't crash in 0x0 environment (flutter/flutter#181481) 2026-02-03 [email protected] Roll Dart SDK from 56294a92d5cc to 54322a0b1109 (1 revision) (flutter/flutter#181872) 2026-02-03 [email protected] Fix decorated box (flutter/flutter#179802) 2026-02-03 [email protected] Roll pub packages (flutter/flutter#181871) 2026-02-03 [email protected] Remove Material library dependency from expansible_test.dart (flutter/flutter#181657) 2026-02-03 [email protected] Organize and update fragment shader uniform tests. (flutter/flutter#181822) 2026-02-03 [email protected] fix(web_ui): handle non-invertible matrices in ImageFilter.matrix (flutter/flutter#181742) 2026-02-03 [email protected] Remove unnecessary Material import from cupertino/slider_test.dart (flutter/flutter#180957) 2026-02-03 [email protected] Remove the Flutter.xcframework as a swift dependency (flutter/flutter#181739) 2026-02-03 [email protected] feature: implementation of tooltips in the `_TestWindowingOwner` and minor bugfixes to the multiple windows example app (flutter/flutter#181510) 2026-02-03 [email protected] [Web] Fix flt-platform-view comment (flutter/flutter#181576) 2026-02-03 [email protected] Marks Linux_pixel_7pro android_verified_input_test to be unflaky (flutter/flutter#179120) 2026-02-03 [email protected] Unmark `hybrid_android_views_integration_test` as bringup (flutter/flutter#181628) 2026-02-03 [email protected] Remove material from sliver_tree_test.dart (flutter/flutter#181415) 2026-02-03 [email protected] Make `android_plugin_new_output_dir_test` only build release (flutter/flutter#181677) 2026-02-03 [email protected] Roll customer tests (flutter/flutter#181825) 2026-02-03 [email protected] Add Linux Foundation Health Score badge to README (flutter/flutter#175587) 2026-02-03 [email protected] Remove unused getters on AndroidProject class (flutter/flutter#181860) 2026-02-03 [email protected] Adds batch release doc for flutter/package (flutter/flutter#181676) 2026-02-03 [email protected] [ Tool ] Don't use `globals.platform` in `getFlutterRoot()` (flutter/flutter#181859) 2026-02-03 [email protected] Roll Packages from 837dbbd to 5b1bea8 (10 revisions) (flutter/flutter#181857) 2026-02-03 [email protected] Remove material from basic_test.dart (flutter/flutter#181444) 2026-02-03 [email protected] [ Tool ] Fix regression introduced in flutter/flutter#181421 (flutter/flutter#181826) If this roll has caused a breakage, revert this CL and stop the roller ...
) Moves the initialization logic for web and non-web compilers into the `ResidentCompiler` factory and reduces code duplication. Also bumps the flutter_tools Dart SDK version to ^3.10.0 to enable dot shorthands. --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
`dev/devicelab/bin/task/flutter_test_performance.dart` regressed due to the CFE not being initialized with the correct dill file for the target test. This change updates `TestCompiler` to pass the correct dill file when creating the `ResidentCompiler` and adds a test to verify that the `ResidentCompiler` is initialized with the correct dill.
) Moves the initialization logic for web and non-web compilers into the `ResidentCompiler` factory and reduces code duplication. Also bumps the flutter_tools Dart SDK version to ^3.10.0 to enable dot shorthands. --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
`dev/devicelab/bin/task/flutter_test_performance.dart` regressed due to the CFE not being initialized with the correct dill file for the target test. This change updates `TestCompiler` to pass the correct dill file when creating the `ResidentCompiler` and adds a test to verify that the `ResidentCompiler` is initialized with the correct dill.
) Moves the initialization logic for web and non-web compilers into the `ResidentCompiler` factory and reduces code duplication. Also bumps the flutter_tools Dart SDK version to ^3.10.0 to enable dot shorthands. --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
`dev/devicelab/bin/task/flutter_test_performance.dart` regressed due to the CFE not being initialized with the correct dill file for the target test. This change updates `TestCompiler` to pass the correct dill file when creating the `ResidentCompiler` and adds a test to verify that the `ResidentCompiler` is initialized with the correct dill.
Moves the initialization logic for web and non-web compilers into the
ResidentCompilerfactory and reduces code duplication.Also bumps the flutter_tools Dart SDK version to ^3.10.0 to enable dot shorthands.