Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

External sizes - #35813

Merged
auto-submit[bot] merged 7 commits into
flutter-team-archive:mainfrom
dnfield:external_sizes
Sep 6, 2022
Merged

External sizes#35813
auto-submit[bot] merged 7 commits into
flutter-team-archive:mainfrom
dnfield:external_sizes

Conversation

@dnfield

@dnfield dnfield commented Aug 30, 2022

Copy link
Copy Markdown
Contributor

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

dnfield commented Sep 6, 2022

Copy link
Copy Markdown
Contributor Author

flutter/flutter#110627 landed, marking this for submission

@dnfield

dnfield commented Sep 12, 2022

Copy link
Copy Markdown
Contributor Author

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

dnfield commented Sep 12, 2022

Copy link
Copy Markdown
Contributor Author

(@jonahwilliams fyi)

Oleh-Sv pushed a commit to Oleh-Sv/engine that referenced this pull request Sep 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

autosubmit Merge PR when tree becomes green via auto submit App

Development

Successfully merging this pull request may close these issues.

4 participants