-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Add static_path_tessellation macrobenchmark #131837
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
Add static_path_tessellation macrobenchmark #131837
Conversation
1ef1fab to
fd481ce
Compare
fd481ce to
ca218de
Compare
3305a57 to
749429b
Compare
749429b to
e60d840
Compare
|
Can we add two varieties of this? One static path, and one with the same paths but under a scale transform that prevents the patches from being cached? For example something like My biggest concern with caching implementations is that if we only measure cases where the caching is successful (cough cough raster cache), then we'll miss cases where we make non-optimal tradeoffs otherwise. For example, at some point we'll move to a compute based approach for polyline/stroke paths. That may slightly regress a benchmark with tons of completely static paths, but dramatically improve a benchmark with uncachable paths. If we have both benchmarks, then we'll be more aware of the tradeoffs we make. |
jonahwilliams
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.
Also, you can turn off the raster cache in the skia backend by setting willChange to true on the CustomPaint widget
|
I like the idea. For example computing bounds does lot of small allocations right now. Fixing that is easy, but will not show any difference for cached paths (bounds are cached with path), but might for uncached paths. |
|
I split it into |
| key: const Key( | ||
| 'animate_button'), // this key is used by the driver test | ||
| child: const Text('Animate'), |
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.
Rather than have a button toggle between them, can we configure this via an argument passed to the PathTessellationPage widget constructor - and then have two separate routes for static and dynamic?
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.
Or leave the toggle, but let the route configure the default? I guess its fine - I just have driver test PTSD
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.
I don't mind making this two separate routes. I actually wanted to do it that way initially but I think other tests seem to have toggles so I wasn't sure if that's the preferred way.
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.
Yeah, that's fine!
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.
Given that the home page button is actually used to push the route (runDriverTestForRoute), it doesn't really seem to make sense to add a separate route without adding a separate home button.
So I not quite sure what you prefer. I can either make this two routes + two buttons at the home page, or one route + animate button (leave as it is now).
jonahwilliams
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 with nit.
I will handle turning this on for CI, I have some other pending benchmarks to add so I'll just make the configuration change after this lands.
flutter/flutter@ad0aa8d...436df69 2023-08-08 [email protected] Roll Flutter Engine from 9c83d90b01bd to 146c4c9487fc (6 revisions) (flutter/flutter#132112) 2023-08-08 [email protected] Roll Flutter Engine from c27109291e22 to 9c83d90b01bd (5 revisions) (flutter/flutter#132108) 2023-08-08 [email protected] Roll Flutter Engine from be085f6699b6 to c27109291e22 (3 revisions) (flutter/flutter#132086) 2023-08-08 [email protected] Revert "Replace TextField.canRequestFocus with TextField.focusNode.canRequestFocus" (flutter/flutter#132104) 2023-08-08 [email protected] [Impeller] add drawVertices and drawAtlas benchmarks. (flutter/flutter#132080) 2023-08-07 [email protected] Adds more documentations around ignoreSemantics deprecations. (flutter/flutter#131287) 2023-08-07 [email protected] [web] New HtmlElementView.fromTagName constructor (flutter/flutter#130513) 2023-08-07 [email protected] Move mock canvas to flutter_test (flutter/flutter#131631) 2023-08-07 [email protected] Add static_path_tessellation macrobenchmark (flutter/flutter#131837) 2023-08-07 [email protected] [web] Remove usage of `ui.webOnlyInitializePlatform()` (flutter/flutter#131344) 2023-08-07 [email protected] Roll Flutter Engine from 39a575f65d50 to be085f6699b6 (1 revision) (flutter/flutter#132069) 2023-08-07 [email protected] Android context menu theming and visual update (flutter/flutter#131816) 2023-08-07 [email protected] Roll Flutter Engine from 39ce1c097bce to 39a575f65d50 (2 revisions) (flutter/flutter#132064) 2023-08-07 [email protected] CupertinoContextMenu improvement (flutter/flutter#131030) 2023-08-07 [email protected] Roll Flutter Engine from 5b47c0577060 to 39ce1c097bce (3 revisions) (flutter/flutter#132057) 2023-08-07 [email protected] Slider should check `mounted` before start interaction (flutter/flutter#132010) 2023-08-07 [email protected] Roll Packages from ce53da1 to d7ee75a (7 revisions) (flutter/flutter#132058) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
This adds a macrobenchmark representative of a real world application that uses SVG icons. The scenario of rasterizing complex paths that don't change over time does not seem to be covered by any other macrobenchmark and shows a significantly slower impeller performance compared to skia.
It's actually bit problematic to measure this because on A15 the CPU load with impeller is high enough to trigger CPU frequency change. So in order to get consistent reading I had to add a spinning background thread that would keep the CPU at highest frequency.
GeometryPainterseems to have triggered the complexity threshold for raster cache.Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.