Skip to content

Conversation

@fzyzcjy
Copy link
Contributor

@fzyzcjy fzyzcjy commented Oct 3, 2023

IMHO, this tiny change will (1) improve performance a super tiny bit, and (2) ensure nobody can accidentally make the list have other than 2 elements.

List which issues are fixed by this PR. You must list at least one issue.

If you had to change anything in the flutter/tests repo, include a link to the migration guide as per the breaking change policy.

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

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

@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie or stuartmorgan on the #hackers channel in Chat (don't just cc them here, they won't see it! Use Discord!).

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.

@github-actions github-actions bot added a: text input Entering text in a text field or keyboard related problems framework flutter/packages/flutter repository. See also f: labels. labels Oct 3, 2023
@fzyzcjy fzyzcjy changed the title Tiny improve performance by using records instead of lists Tiny improve code style by using records instead of lists Oct 3, 2023
@stuartmorgan-g
Copy link
Contributor

test-exempt: code refactor with no semantic change

Copy link
Contributor

@tgucio tgucio left a comment

Choose a reason for hiding this comment

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

LGTM

@tgucio tgucio added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 6, 2023
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Oct 6, 2023
@auto-submit
Copy link
Contributor

auto-submit bot commented Oct 6, 2023

auto label is removed for flutter/flutter/135886, due to This PR has not met approval requirements for merging. You are not a member of flutter-hackers and need 1 more review(s) in order to merge this PR.

  • Merge guidelines: You need at least one approved review if you are already part of flutter-hackers or two member reviews if you are not a flutter-hacker before re-applying the autosubmit label. Reviewers: If you left a comment approving, please use the "approve" review action instead.

@tgucio tgucio merged commit 7b0293d into flutter:master Oct 6, 2023
@bernaferrari
Copy link
Contributor

Wow, super smart.

@tgucio
Copy link
Contributor

tgucio commented Oct 6, 2023

BTW, I just realised a list will be created anyway here:

    Overlay.of(context, rootOverlay: true, debugRequiredFor: debugRequiredFor)
        .insertAll(<OverlayEntry>[_handles!.start, _handles!.end]);

Could be eliminated with two calls I guess:

    Overlay.of(context, rootOverlay: true, debugRequiredFor: debugRequiredFor)
        ..insert(_handles!.start)
        ..insert(_handles!.end);

@bernaferrari
Copy link
Contributor

I think I'm going to make an AI parser that identifies if there is a place elsewhere in the codebase that could be improved.

auto-submit bot pushed a commit to flutter/packages that referenced this pull request Oct 6, 2023
flutter/flutter@fe0275f...ad20089

2023-10-06 engine-flutter-autoroll@skia.org Roll Flutter Engine from cc9bc9e2c0d3 to 59b6b94e1a51 (1 revision) (flutter/flutter#136066)
2023-10-06 sokolovskyi.konstantin@gmail.com Fix memory leaks in DateRangePickerDialog. (flutter/flutter#136034)
2023-10-06 engine-flutter-autoroll@skia.org Roll Flutter Engine from 6492e1f8c315 to cc9bc9e2c0d3 (1 revision) (flutter/flutter#136062)
2023-10-06 5236035+fzyzcjy@users.noreply.github.com Tiny improve code style by using records instead of lists (flutter/flutter#135886)
2023-10-05 engine-flutter-autoroll@skia.org Roll Flutter Engine from 27a674466094 to 6492e1f8c315 (1 revision) (flutter/flutter#136052)
2023-10-05 smartercallum@gmail.com Upload frame_request_pending_latency [attempt #2] (flutter/flutter#135890)
2023-10-05 engine-flutter-autoroll@skia.org Roll Flutter Engine from 0ff05464f42f to 27a674466094 (1 revision) (flutter/flutter#136050)
2023-10-05 engine-flutter-autoroll@skia.org Roll Flutter Engine from ad83202a59a6 to 0ff05464f42f (1 revision) (flutter/flutter#136047)
2023-10-05 engine-flutter-autoroll@skia.org Roll Flutter Engine from f8d53c5fe9f2 to ad83202a59a6 (2 revisions) (flutter/flutter#136040)
2023-10-05 engine-flutter-autoroll@skia.org Roll Packages from d654f75 to 6714d50 (3 revisions) (flutter/flutter#136039)

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 rmistry@google.com,stuartmorgan@google.com,ychris@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://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Mairramer pushed a commit to Mairramer/flutter that referenced this pull request Oct 10, 2023
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 framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants