Skip to content
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

Small PbList improvements #906

Merged
merged 1 commit into from
Dec 5, 2023
Merged

Small PbList improvements #906

merged 1 commit into from
Dec 5, 2023

Conversation

osa1
Copy link
Member

@osa1 osa1 commented Dec 5, 2023

  • Reduce binary size increase caused by cl/586928869 by adding dart2js:never-inline pragmas to add, addAll, clear.

  • Override isEmpty, isNotEmpty avoid virtual calls to length.

  • Override get iterator to use the known iterator type of _wrappedList, which is always a _GrowableList.

cl/587627017

- Reduce binary size increase caused by cl/586928869 by adding
  `dart2js:never-inline` pragmas to `add`, `addAll`, `clear`.

- Override `isEmpty`, `isNotEmpty` avoid virtual calls to `length`.

- Override `get iterator` to use the known iterator type of
  `_wrappedList`, which is always a `_GrowableList`.

cl/587627017
@osa1 osa1 requested a review from mkustermann December 5, 2023 07:56
@mkustermann
Copy link
Collaborator

Reduce binary size increase caused by cl/586928869 by adding dart2js:never-inline pragmas to add, addAll, clear.

That CL in itself is just making types more precise. If this leads to a size increase, it's because the dart2js inlining heuristics decided it's worthwhile inlining. @rakudrama are the heuristics in dart2js doing the right thing here?

@osa1
Copy link
Member Author

osa1 commented Dec 5, 2023

@mkustermann see b/314275739 for discussion on this.

@osa1 osa1 merged commit 20ec685 into master Dec 5, 2023
17 of 18 checks passed
@osa1 osa1 deleted the osa1/pb_list_dart2js branch December 5, 2023 08:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants