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

External sizes #35813

Merged
merged 7 commits into from
Sep 6, 2022
Merged

External sizes #35813

merged 7 commits into from
Sep 6, 2022

Conversation

dnfield
Copy link
Contributor

@dnfield dnfield commented Aug 30, 2022

Drops GetAllocationSize everywhere.

Instead, just provide the shallow size of the native peer to the VM.

The problem with reporting the "deep" size is that we often were getting it wrong (even to the point of just completely making a number up). This causes less predictability in GC, and after https://dart-review.googlesource.com/c/sdk/+/256201 reporting too large of a size could cause the VM to refuse to let us allocate the weak handle/finalizer.

Instead, we should just be eagerly disposing of objects when we are done and not relying on GC to clean them up.

This patch should not be landed until flutter/flutter#110627 or something like it lands, since we'd be in a spot where paragraphs would both cause less GC pressure and not get disposed of properly without it (right now we rely on the GC pressure to collect paragraph objects).

@dnfield dnfield marked this pull request as ready for review September 6, 2022 20:49
@dnfield dnfield added the autosubmit Merge PR when tree becomes green via auto submit App label Sep 6, 2022
@dnfield
Copy link
Contributor Author

dnfield commented Sep 6, 2022

flutter/flutter#110627 landed, marking this for submission

@dnfield
Copy link
Contributor Author

dnfield commented Sep 12, 2022

I was going to say this is surprising, since we already removed that code for images - but that benchmark is actually testing the time it takes to load an ImmutableBuffer, which this patch removed, so it makes sense.

@dnfield
Copy link
Contributor Author

dnfield commented Sep 12, 2022

(@jonahwilliams fyi)

Oleh-Sv pushed a commit to Oleh-Sv/engine that referenced this pull request Sep 28, 2022
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants