-
Notifications
You must be signed in to change notification settings - Fork 6k
Increase the memory usage estimate for EngineLayer #8700
Conversation
|
Would it be feasible to calculate a more accurate estimate of the size instead of bumping the constant? This looks like an improvement to me generally but there's still going to be cases where this is too low, and extra garbage collection when this is too high isn't ideal. |
|
I don't know of a way to do that accurately. @liyuqian any ideas? |
|
I think the main cost may either come from SkPicture or SkImage. I should be able to count those during the |
liyuqian
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.
LGTM.
mklim
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.
LGTM. This fixes the leak so I think it's worth merging as-is even if we don't have a solution for really returning the correct allocation size yet.
| // Dart GC. The ContainerLayer may hold references to a tree of other layers, | ||
| // which in turn may contain Skia objects. | ||
| return 3000; | ||
| return 200000; |
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.
nit: Please add a TODO here linking to flutter/flutter#31498.
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.
done
EngineLayers can hold references to Skia objects and may consume significant resources. This change will result in more aggressive cleanup of EngineLayers by the Dart GC. See flutter/flutter#31303
1c7fa36 to
b58e0d8
Compare
flutter/engine@3e47b4b...26b30a4 git log 3e47b4b..26b30a4 --no-merges --oneline 26b30a4 Roll src/third_party/skia 9adc82c73df0..46d0f9aad1e6 (41 commits) (flutter/engine#8736) fdd8fdb Fix reflective ctor invocation in FlutterFragment (flutter/engine#8735) a56aa95 [scenic] Purge references to Mozart (flutter/engine#8712) e4c439d Fix include paths in libtxt to prepare for upcoming Skia build change (flutter/engine#8723) 7c8ec37 Document that OpacityLayer's children are nonempty (flutter/engine#8707) 30fb4a6 Increase the memory usage estimate for EngineLayer (flutter/engine#8700) The AutoRoll server is located here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+/master/autoroll/README.md If the roll is causing failures, please contact the current sheriff (liyuqian@google.com), and stop the roller if necessary.
|
This appears to have cause dthe regressions in flutter/flutter#31590 |
EngineLayers can hold references to Skia objects and may consume significant
resources. This change will result in more aggressive cleanup of EngineLayers
by the Dart GC.
See flutter/flutter#31303