-
Notifications
You must be signed in to change notification settings - Fork 6k
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
Actually nevermind, this is happening on ToT |
a15ee82
to
a39d13f
Compare
I did some profiling of this PR vs ToT on the regressed grid of opacity benchmark on an iPhone 6-something. ToT Trace: With Change: These profiles can be viewed by unzipping and opening in Instruments. The first few seconds are just navigation to the actual benchmark. With a little bit of charge to callers, I can see that LayerStateStack::restore_to_count and LayerStateStack::do_save end up surprisingly high in the profile's self time. This may or may not constitute part of the reason for the regression. |
@jonahwilliams but did you see an actual regression on the iPhone? I see a net gain in performance on a Pixel 6a, so it isn't so much "that method is called a lot" unless there is something about that method that runs faster on a Pixel than on a Moto G4. Zach's guess that this is a case of blowing the smaller CPU caches on the Moto G4 due to code on different cache lines being hit makes sense, especially since much of this logic used to be duplicated into the Preroll/Paint methods. Now those methods are calling into a mechanism which may live on different code pages in memory. |
I don't really observe any regression on iOS locally, I'll try on Android in a bit. ToT:
Patch:
|
I'm holding off on this while I investigate a prototype for a lower-overhead version that uses stack-allocated objects in lieue of the current vector of StateEntry objects... |
The new prototype was less wieldy than the existing design. I think I can retrofit some of the concepts back onto the existing design in a future effort, so I'm removing the WIP label on this PR. |
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
…115589) * 556e0415a Revert "[Impeller] Reland: Refactor color source resolution to use explicit factory types (#37677)" (flutter/engine#37720) * 5b31f4f0d Reland layer state stack 2 (flutter/engine#37394) * d955a72c5 [macOS] Merge FlutterSurfaceManager and impls (flutter/engine#37701)
…lutter#115589) * 556e0415a Revert "[Impeller] Reland: Refactor color source resolution to use explicit factory types (flutter#37677)" (flutter/engine#37720) * 5b31f4f0d Reland layer state stack 2 (flutter/engine#37394) * d955a72c5 [macOS] Merge FlutterSurfaceManager and impls (flutter/engine#37701)
…lutter#115589) * 556e0415a Revert "[Impeller] Reland: Refactor color source resolution to use explicit factory types (flutter#37677)" (flutter/engine#37720) * 5b31f4f0d Reland layer state stack 2 (flutter/engine#37394) * d955a72c5 [macOS] Merge FlutterSurfaceManager and impls (flutter/engine#37701)
Fixes: flutter/flutter#82961 Fixes: flutter/flutter#113346 The fix was a simple fallout from the previous work to add support for SkM44 throughout the DL and Diff mechanisms (see flutter/flutter#82955, flutter/flutter#116198, #37394) Tested with its own existing and new unit tests as well as the test case from flutter/flutter#113346
Fixes: flutter/flutter#82961 Fixes: flutter/flutter#113346 The fix was a simple fallout from the previous work to add support for SkM44 throughout the DL and Diff mechanisms (see flutter/flutter#82955, flutter/flutter#116198, flutter#37394) Tested with its own existing and new unit tests as well as the test case from flutter/flutter#113346
This reland fixes the cached rendering issues (see flutter/flutter#114359) resulting from doubling up the transform when preparing a state stack for updating a cache entry.
Many of the performance regressions seem to be better now with these recent fixes, but I've been trying to track down a 10-20% regression in some of the peephole benchmarks. Most notably the "grid of opacity" benchmark (see the 2 recent bumps in this Skia Perf graph). I've tracked this down to the most probable cause being the copies and manipulations of SkM44 matrices that can be reduced or eliminated with more work.
I'm creating this PR now so that some developers can have access to the bug fixes before I fix the last of the performance regressions.