engine icon indicating copy to clipboard operation
engine copied to clipboard

[Impeller] cache glyph atlas if contents are unchanged

Open jonahwilliams opened this issue 3 years ago • 3 comments

Attempt to improve average case performance by not recreating the glyph atlas if the contents are identical

jonahwilliams avatar Oct 11 '22 20:10 jonahwilliams

FYI @dnfield

jonahwilliams avatar Oct 11 '22 21:10 jonahwilliams

I ran some benchmarks on the flutter gallery using a newer iPhone. This is a tiny biy (0.5 -1 ms) faster, but we already know that isn't a particularly text heavy app. I'll have to try again with customer chalk when I'm back next week

jonahwilliams avatar Oct 11 '22 21:10 jonahwilliams

Playing around with the gallery app, I can see that on an older iPhone model (6? 7?), It can take 3-4ms to create a glyph atlas. Caching it means that the raster times for frames where the atlas is fully cached are measurably faster. This may or may not show up in synthetic benchmarks based on how quickly one "dwells" at a particular page in the app.

jonahwilliams avatar Oct 11 '22 21:10 jonahwilliams

Nice improvement to average raster times https://flutter-flutter-perf.skia.org/e/?begin=1664822227&end=1666708462&keys=X875709053417f4b0ee1cc4ca165943fc&queries=arch%3Dintel%26branch%3Dmaster%26config%3Ddefault%26device_type%3DiPhone_6s%26device_version%3DiOS-15.5%26device_version%3Dnone%26host_type%3Dmac%26sub_result%3Daverage_frame_rasterizer_time_millis%26test%3Dflutter_gallery__transition_perf_e2e_impeller_ios&requestType=0&selected=commit%3D31713%26name%3D%252Carch%253Dintel%252Cbranch%253Dmaster%252Cconfig%253Ddefault%252Cdevice_type%253DiPhone_6s%252Cdevice_version%253Dnone%252Chost_type%253Dmac%252Csub_result%253Daverage_frame_rasterizer_time_millis%252Ctest%253Dflutter_gallery__transition_perf_e2e_impeller_ios%252C&xbaroffset=31713

zanderso avatar Oct 25 '22 15:10 zanderso