-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Revert "Removed superfluous copy in license checker (#167146)" #167246
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This reverts commit b4dc233. The license script provides a RegExp wrapper that tracks the cost of the script's regexes. Dart's RegExp.allMatches returns an Iterable whose iterators lazily execute the regex. Calling toList will execute the regex on the entire input within allMatches, allowing measurement of the regex's cost. Returning the Iterable will instead shift the execution cost to the caller. Also, in local measurements I'm seeing significantly better performance from finding all of the matches immediately with toList versus having the caller use the lazy iterator.
|
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. |
gaaclarke
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, in local measurements I'm seeing significantly better performance from finding all of the matches immediately with toList versus having the caller use the lazy iterator.
The impetus for this change was running the profiler over the "Finding files..." phase. toList() was the hottest symbol and will make all the results get copied unnecessarily. It's possible that the vast majority of the time in that symbol was actually in the regex. If your measurement was on total time to execute, reverting sounds good to me.
I'm not seeing any meaningful positive change in https://ci.chromium.org/ui/p/flutter/builders/try/Linux%20linux_license?limit=200
flutter/flutter@aef4718...ecabb1a 2025-04-17 15619084+vashworth@users.noreply.github.com Hide error on mDNS registration failure and print warning in flutter attach (flutter/flutter#166782) 2025-04-17 bruno.leroux@gmail.com Add support for language hints in TextFields (Android only) (flutter/flutter#165554) 2025-04-17 engine-flutter-autoroll@skia.org Roll Skia from d8f13372549d to cc2b57434651 (1 revision) (flutter/flutter#167331) 2025-04-17 bruno.leroux@gmail.com Add DropdownMenu.restorationId (flutter/flutter#166684) 2025-04-17 engine-flutter-autoroll@skia.org Roll Skia from 3d6165b70199 to d8f13372549d (14 revisions) (flutter/flutter#167325) 2025-04-17 stanleycocoa@gmail.com fix(CircularProgressIndicator.adaptive): strokeWidth default value (flutter/flutter#165370) 2025-04-17 ahmedelsaayid@gmail.com Remove unnecessary builder (flutter/flutter#166623) 2025-04-17 34871572+gmackall@users.noreply.github.com Add a `gradle_errors.dart`entry for missing NDK source.properties file (flutter/flutter#167320) 2025-04-17 engine-flutter-autoroll@skia.org Roll Skia from 6627deb65939 to 3d6165b70199 (1 revision) (flutter/flutter#167255) 2025-04-17 engine-flutter-autoroll@skia.org Manual roll Dart SDK from 87965ab4864e to 992221a362ec (35 revisions) (flutter/flutter#167243) 2025-04-16 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from 7bWzHwIPBTyU6R9nO... to m8Aln7fTF_8zy1V9N... (flutter/flutter#167312) 2025-04-16 15619084+vashworth@users.noreply.github.com Don't throw on error for mDNS when searching for Dart VML url on core devices (flutter/flutter#167135) 2025-04-16 34465683+rkishan516@users.noreply.github.com Fix: Localization for non zero time in 24 hours format (flutter/flutter#164885) 2025-04-16 30870216+gaaclarke@users.noreply.github.com Updated docstrings for TextureContents (flutter/flutter#167221) 2025-04-16 30870216+gaaclarke@users.noreply.github.com Broke cyclical dependency with dlpath and typographer. (flutter/flutter#167293) 2025-04-16 34871572+gmackall@users.noreply.github.com Set an additional CMake arg in `forceNdkDownload` to make the task name align with the `BuildType` (flutter/flutter#167240) 2025-04-16 huy@nevercode.io Fix Carousel crashes when using PageStorageKey (flutter/flutter#166817) 2025-04-16 jason-simmons@users.noreply.github.com Revert "Removed superfluous copy in license checker (#167146)" (flutter/flutter#167246) 2025-04-16 dacoharkes@google.com [native assets] Roll dependencies (flutter/flutter#167287) 2025-04-16 fluttergithubbot@gmail.com Marks Linux_pixel_7pro static_path_stroke_tessellation_perf__timeline_summary to be unflaky (flutter/flutter#167259) 2025-04-16 34465683+rkishan516@users.noreply.github.com Feat: Add carousel view theme (flutter/flutter#164769) 2025-04-16 fluttergithubbot@gmail.com Marks Mac_ios dynamic_path_stroke_tessellation_perf_ios__timeline_summary to be unflaky (flutter/flutter#167261) 2025-04-16 jason-simmons@users.noreply.github.com When using --local-web-sdk, use a locally built Dart SDK if one is available (flutter/flutter#166732) 2025-04-16 30870216+gaaclarke@users.noreply.github.com Added emulator version to doctor (flutter/flutter#167236) 2025-04-16 fluttergithubbot@gmail.com Marks Mac_ios static_path_stroke_tessellation_perf_ios__timeline_summary to be unflaky (flutter/flutter#167260) 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 stuartmorgan@google.com,tarrinneal@google.com 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
…flutter#167246) This reverts commit b4dc233. The license script provides a RegExp wrapper that tracks the cost of the script's regexes. Dart's RegExp.allMatches returns an Iterable whose iterators lazily execute the regex. Calling toList will execute the regex on the entire input within allMatches, allowing measurement of the regex's cost. Returning the Iterable will instead shift the execution cost to the caller. Also, in local measurements I'm seeing significantly better performance from finding all of the matches immediately with toList versus having the caller use the lazy iterator.
flutter/flutter@aef4718...ecabb1a 2025-04-17 15619084+vashworth@users.noreply.github.com Hide error on mDNS registration failure and print warning in flutter attach (flutter/flutter#166782) 2025-04-17 bruno.leroux@gmail.com Add support for language hints in TextFields (Android only) (flutter/flutter#165554) 2025-04-17 engine-flutter-autoroll@skia.org Roll Skia from d8f13372549d to cc2b57434651 (1 revision) (flutter/flutter#167331) 2025-04-17 bruno.leroux@gmail.com Add DropdownMenu.restorationId (flutter/flutter#166684) 2025-04-17 engine-flutter-autoroll@skia.org Roll Skia from 3d6165b70199 to d8f13372549d (14 revisions) (flutter/flutter#167325) 2025-04-17 stanleycocoa@gmail.com fix(CircularProgressIndicator.adaptive): strokeWidth default value (flutter/flutter#165370) 2025-04-17 ahmedelsaayid@gmail.com Remove unnecessary builder (flutter/flutter#166623) 2025-04-17 34871572+gmackall@users.noreply.github.com Add a `gradle_errors.dart`entry for missing NDK source.properties file (flutter/flutter#167320) 2025-04-17 engine-flutter-autoroll@skia.org Roll Skia from 6627deb65939 to 3d6165b70199 (1 revision) (flutter/flutter#167255) 2025-04-17 engine-flutter-autoroll@skia.org Manual roll Dart SDK from 87965ab4864e to 992221a362ec (35 revisions) (flutter/flutter#167243) 2025-04-16 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from 7bWzHwIPBTyU6R9nO... to m8Aln7fTF_8zy1V9N... (flutter/flutter#167312) 2025-04-16 15619084+vashworth@users.noreply.github.com Don't throw on error for mDNS when searching for Dart VML url on core devices (flutter/flutter#167135) 2025-04-16 34465683+rkishan516@users.noreply.github.com Fix: Localization for non zero time in 24 hours format (flutter/flutter#164885) 2025-04-16 30870216+gaaclarke@users.noreply.github.com Updated docstrings for TextureContents (flutter/flutter#167221) 2025-04-16 30870216+gaaclarke@users.noreply.github.com Broke cyclical dependency with dlpath and typographer. (flutter/flutter#167293) 2025-04-16 34871572+gmackall@users.noreply.github.com Set an additional CMake arg in `forceNdkDownload` to make the task name align with the `BuildType` (flutter/flutter#167240) 2025-04-16 huy@nevercode.io Fix Carousel crashes when using PageStorageKey (flutter/flutter#166817) 2025-04-16 jason-simmons@users.noreply.github.com Revert "Removed superfluous copy in license checker (#167146)" (flutter/flutter#167246) 2025-04-16 dacoharkes@google.com [native assets] Roll dependencies (flutter/flutter#167287) 2025-04-16 fluttergithubbot@gmail.com Marks Linux_pixel_7pro static_path_stroke_tessellation_perf__timeline_summary to be unflaky (flutter/flutter#167259) 2025-04-16 34465683+rkishan516@users.noreply.github.com Feat: Add carousel view theme (flutter/flutter#164769) 2025-04-16 fluttergithubbot@gmail.com Marks Mac_ios dynamic_path_stroke_tessellation_perf_ios__timeline_summary to be unflaky (flutter/flutter#167261) 2025-04-16 jason-simmons@users.noreply.github.com When using --local-web-sdk, use a locally built Dart SDK if one is available (flutter/flutter#166732) 2025-04-16 30870216+gaaclarke@users.noreply.github.com Added emulator version to doctor (flutter/flutter#167236) 2025-04-16 fluttergithubbot@gmail.com Marks Mac_ios static_path_stroke_tessellation_perf_ios__timeline_summary to be unflaky (flutter/flutter#167260) 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 stuartmorgan@google.com,tarrinneal@google.com 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
flutter/flutter@aef4718...ecabb1a 2025-04-17 15619084+vashworth@users.noreply.github.com Hide error on mDNS registration failure and print warning in flutter attach (flutter/flutter#166782) 2025-04-17 bruno.leroux@gmail.com Add support for language hints in TextFields (Android only) (flutter/flutter#165554) 2025-04-17 engine-flutter-autoroll@skia.org Roll Skia from d8f13372549d to cc2b57434651 (1 revision) (flutter/flutter#167331) 2025-04-17 bruno.leroux@gmail.com Add DropdownMenu.restorationId (flutter/flutter#166684) 2025-04-17 engine-flutter-autoroll@skia.org Roll Skia from 3d6165b70199 to d8f13372549d (14 revisions) (flutter/flutter#167325) 2025-04-17 stanleycocoa@gmail.com fix(CircularProgressIndicator.adaptive): strokeWidth default value (flutter/flutter#165370) 2025-04-17 ahmedelsaayid@gmail.com Remove unnecessary builder (flutter/flutter#166623) 2025-04-17 34871572+gmackall@users.noreply.github.com Add a `gradle_errors.dart`entry for missing NDK source.properties file (flutter/flutter#167320) 2025-04-17 engine-flutter-autoroll@skia.org Roll Skia from 6627deb65939 to 3d6165b70199 (1 revision) (flutter/flutter#167255) 2025-04-17 engine-flutter-autoroll@skia.org Manual roll Dart SDK from 87965ab4864e to 992221a362ec (35 revisions) (flutter/flutter#167243) 2025-04-16 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from 7bWzHwIPBTyU6R9nO... to m8Aln7fTF_8zy1V9N... (flutter/flutter#167312) 2025-04-16 15619084+vashworth@users.noreply.github.com Don't throw on error for mDNS when searching for Dart VML url on core devices (flutter/flutter#167135) 2025-04-16 34465683+rkishan516@users.noreply.github.com Fix: Localization for non zero time in 24 hours format (flutter/flutter#164885) 2025-04-16 30870216+gaaclarke@users.noreply.github.com Updated docstrings for TextureContents (flutter/flutter#167221) 2025-04-16 30870216+gaaclarke@users.noreply.github.com Broke cyclical dependency with dlpath and typographer. (flutter/flutter#167293) 2025-04-16 34871572+gmackall@users.noreply.github.com Set an additional CMake arg in `forceNdkDownload` to make the task name align with the `BuildType` (flutter/flutter#167240) 2025-04-16 huy@nevercode.io Fix Carousel crashes when using PageStorageKey (flutter/flutter#166817) 2025-04-16 jason-simmons@users.noreply.github.com Revert "Removed superfluous copy in license checker (#167146)" (flutter/flutter#167246) 2025-04-16 dacoharkes@google.com [native assets] Roll dependencies (flutter/flutter#167287) 2025-04-16 fluttergithubbot@gmail.com Marks Linux_pixel_7pro static_path_stroke_tessellation_perf__timeline_summary to be unflaky (flutter/flutter#167259) 2025-04-16 34465683+rkishan516@users.noreply.github.com Feat: Add carousel view theme (flutter/flutter#164769) 2025-04-16 fluttergithubbot@gmail.com Marks Mac_ios dynamic_path_stroke_tessellation_perf_ios__timeline_summary to be unflaky (flutter/flutter#167261) 2025-04-16 jason-simmons@users.noreply.github.com When using --local-web-sdk, use a locally built Dart SDK if one is available (flutter/flutter#166732) 2025-04-16 30870216+gaaclarke@users.noreply.github.com Added emulator version to doctor (flutter/flutter#167236) 2025-04-16 fluttergithubbot@gmail.com Marks Mac_ios static_path_stroke_tessellation_perf_ios__timeline_summary to be unflaky (flutter/flutter#167260) 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 stuartmorgan@google.com,tarrinneal@google.com 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
flutter/flutter@aef4718...ecabb1a 2025-04-17 15619084+vashworth@users.noreply.github.com Hide error on mDNS registration failure and print warning in flutter attach (flutter/flutter#166782) 2025-04-17 bruno.leroux@gmail.com Add support for language hints in TextFields (Android only) (flutter/flutter#165554) 2025-04-17 engine-flutter-autoroll@skia.org Roll Skia from d8f13372549d to cc2b57434651 (1 revision) (flutter/flutter#167331) 2025-04-17 bruno.leroux@gmail.com Add DropdownMenu.restorationId (flutter/flutter#166684) 2025-04-17 engine-flutter-autoroll@skia.org Roll Skia from 3d6165b70199 to d8f13372549d (14 revisions) (flutter/flutter#167325) 2025-04-17 stanleycocoa@gmail.com fix(CircularProgressIndicator.adaptive): strokeWidth default value (flutter/flutter#165370) 2025-04-17 ahmedelsaayid@gmail.com Remove unnecessary builder (flutter/flutter#166623) 2025-04-17 34871572+gmackall@users.noreply.github.com Add a `gradle_errors.dart`entry for missing NDK source.properties file (flutter/flutter#167320) 2025-04-17 engine-flutter-autoroll@skia.org Roll Skia from 6627deb65939 to 3d6165b70199 (1 revision) (flutter/flutter#167255) 2025-04-17 engine-flutter-autoroll@skia.org Manual roll Dart SDK from 87965ab4864e to 992221a362ec (35 revisions) (flutter/flutter#167243) 2025-04-16 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from 7bWzHwIPBTyU6R9nO... to m8Aln7fTF_8zy1V9N... (flutter/flutter#167312) 2025-04-16 15619084+vashworth@users.noreply.github.com Don't throw on error for mDNS when searching for Dart VML url on core devices (flutter/flutter#167135) 2025-04-16 34465683+rkishan516@users.noreply.github.com Fix: Localization for non zero time in 24 hours format (flutter/flutter#164885) 2025-04-16 30870216+gaaclarke@users.noreply.github.com Updated docstrings for TextureContents (flutter/flutter#167221) 2025-04-16 30870216+gaaclarke@users.noreply.github.com Broke cyclical dependency with dlpath and typographer. (flutter/flutter#167293) 2025-04-16 34871572+gmackall@users.noreply.github.com Set an additional CMake arg in `forceNdkDownload` to make the task name align with the `BuildType` (flutter/flutter#167240) 2025-04-16 huy@nevercode.io Fix Carousel crashes when using PageStorageKey (flutter/flutter#166817) 2025-04-16 jason-simmons@users.noreply.github.com Revert "Removed superfluous copy in license checker (#167146)" (flutter/flutter#167246) 2025-04-16 dacoharkes@google.com [native assets] Roll dependencies (flutter/flutter#167287) 2025-04-16 fluttergithubbot@gmail.com Marks Linux_pixel_7pro static_path_stroke_tessellation_perf__timeline_summary to be unflaky (flutter/flutter#167259) 2025-04-16 34465683+rkishan516@users.noreply.github.com Feat: Add carousel view theme (flutter/flutter#164769) 2025-04-16 fluttergithubbot@gmail.com Marks Mac_ios dynamic_path_stroke_tessellation_perf_ios__timeline_summary to be unflaky (flutter/flutter#167261) 2025-04-16 jason-simmons@users.noreply.github.com When using --local-web-sdk, use a locally built Dart SDK if one is available (flutter/flutter#166732) 2025-04-16 30870216+gaaclarke@users.noreply.github.com Added emulator version to doctor (flutter/flutter#167236) 2025-04-16 fluttergithubbot@gmail.com Marks Mac_ios static_path_stroke_tessellation_perf_ios__timeline_summary to be unflaky (flutter/flutter#167260) 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 stuartmorgan@google.com,tarrinneal@google.com 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
flutter/flutter@aef4718...ecabb1a 2025-04-17 15619084+vashworth@users.noreply.github.com Hide error on mDNS registration failure and print warning in flutter attach (flutter/flutter#166782) 2025-04-17 bruno.leroux@gmail.com Add support for language hints in TextFields (Android only) (flutter/flutter#165554) 2025-04-17 engine-flutter-autoroll@skia.org Roll Skia from d8f13372549d to cc2b57434651 (1 revision) (flutter/flutter#167331) 2025-04-17 bruno.leroux@gmail.com Add DropdownMenu.restorationId (flutter/flutter#166684) 2025-04-17 engine-flutter-autoroll@skia.org Roll Skia from 3d6165b70199 to d8f13372549d (14 revisions) (flutter/flutter#167325) 2025-04-17 stanleycocoa@gmail.com fix(CircularProgressIndicator.adaptive): strokeWidth default value (flutter/flutter#165370) 2025-04-17 ahmedelsaayid@gmail.com Remove unnecessary builder (flutter/flutter#166623) 2025-04-17 34871572+gmackall@users.noreply.github.com Add a `gradle_errors.dart`entry for missing NDK source.properties file (flutter/flutter#167320) 2025-04-17 engine-flutter-autoroll@skia.org Roll Skia from 6627deb65939 to 3d6165b70199 (1 revision) (flutter/flutter#167255) 2025-04-17 engine-flutter-autoroll@skia.org Manual roll Dart SDK from 87965ab4864e to 992221a362ec (35 revisions) (flutter/flutter#167243) 2025-04-16 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from 7bWzHwIPBTyU6R9nO... to m8Aln7fTF_8zy1V9N... (flutter/flutter#167312) 2025-04-16 15619084+vashworth@users.noreply.github.com Don't throw on error for mDNS when searching for Dart VML url on core devices (flutter/flutter#167135) 2025-04-16 34465683+rkishan516@users.noreply.github.com Fix: Localization for non zero time in 24 hours format (flutter/flutter#164885) 2025-04-16 30870216+gaaclarke@users.noreply.github.com Updated docstrings for TextureContents (flutter/flutter#167221) 2025-04-16 30870216+gaaclarke@users.noreply.github.com Broke cyclical dependency with dlpath and typographer. (flutter/flutter#167293) 2025-04-16 34871572+gmackall@users.noreply.github.com Set an additional CMake arg in `forceNdkDownload` to make the task name align with the `BuildType` (flutter/flutter#167240) 2025-04-16 huy@nevercode.io Fix Carousel crashes when using PageStorageKey (flutter/flutter#166817) 2025-04-16 jason-simmons@users.noreply.github.com Revert "Removed superfluous copy in license checker (#167146)" (flutter/flutter#167246) 2025-04-16 dacoharkes@google.com [native assets] Roll dependencies (flutter/flutter#167287) 2025-04-16 fluttergithubbot@gmail.com Marks Linux_pixel_7pro static_path_stroke_tessellation_perf__timeline_summary to be unflaky (flutter/flutter#167259) 2025-04-16 34465683+rkishan516@users.noreply.github.com Feat: Add carousel view theme (flutter/flutter#164769) 2025-04-16 fluttergithubbot@gmail.com Marks Mac_ios dynamic_path_stroke_tessellation_perf_ios__timeline_summary to be unflaky (flutter/flutter#167261) 2025-04-16 jason-simmons@users.noreply.github.com When using --local-web-sdk, use a locally built Dart SDK if one is available (flutter/flutter#166732) 2025-04-16 30870216+gaaclarke@users.noreply.github.com Added emulator version to doctor (flutter/flutter#167236) 2025-04-16 fluttergithubbot@gmail.com Marks Mac_ios static_path_stroke_tessellation_perf_ios__timeline_summary to be unflaky (flutter/flutter#167260) 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 stuartmorgan@google.com,tarrinneal@google.com 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
…flutter#167246) This reverts commit b4dc233. The license script provides a RegExp wrapper that tracks the cost of the script's regexes. Dart's RegExp.allMatches returns an Iterable whose iterators lazily execute the regex. Calling toList will execute the regex on the entire input within allMatches, allowing measurement of the regex's cost. Returning the Iterable will instead shift the execution cost to the caller. Also, in local measurements I'm seeing significantly better performance from finding all of the matches immediately with toList versus having the caller use the lazy iterator.
This reverts commit b4dc233.
The license script provides a RegExp wrapper that tracks the cost of the script's regexes. Dart's RegExp.allMatches returns an Iterable whose iterators lazily execute the regex. Calling toList will execute the regex on the entire input within allMatches, allowing measurement of the regex's cost. Returning the Iterable will instead shift the execution cost to the caller.
Also, in local measurements I'm seeing significantly better performance from finding all of the matches immediately with toList versus having the caller use the lazy iterator.