uno icon indicating copy to clipboard operation
uno copied to clipboard

perf: reduce SKPaint and SKPath allocations

Open ramezgerges opened this issue 1 year ago • 9 comments

GitHub Issue (If applicable):

PR Type

What kind of change does this PR introduce?

What is the current behavior?

What is the new behavior?

PR Checklist

Please check if your PR fulfills the following requirements:

Other information

Internal Issue (If applicable):

ramezgerges avatar Oct 15 '24 17:10 ramezgerges

🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-18476/index.html

unodevops avatar Oct 15 '24 18:10 unodevops

Can you please try to measure the perf improvement to see how much it helps?

MartinZikmund avatar Oct 16 '24 17:10 MartinZikmund

@MartinZikmund The improvement is most noticeable in a continuously-rendering app (e.g. with animation) and some shapes.

Profiling the HitTest_Shapes samples for around a minute while holding down tab (to shift the focus visual and invalidating the render) gives this:

SKPath: 4.57 MB / 185 MB before vs 179.1 KB / 170 MB after SKPaint: 25 KB / 185 MB before vs 432 B (not KB) / 170 MB after

Seems like optimizing SKPaint didn't matter a whole lot, but it was very high in the profiler graph in a different profiling session earlier today. I don't totally remember the scenario I was testing with.

ramezgerges avatar Oct 16 '24 18:10 ramezgerges

🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-18476/index.html

unodevops avatar Oct 16 '24 18:10 unodevops

🤖 Your WebAssembly Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-18476/index.html

unodevops avatar Oct 16 '24 22:10 unodevops

🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-18476/index.html

unodevops avatar Oct 17 '24 11:10 unodevops

🤖 Your WebAssembly Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-18476/index.html

unodevops avatar Oct 17 '24 12:10 unodevops

🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-18476/index.html

unodevops avatar Oct 17 '24 14:10 unodevops

🤖 Your WebAssembly Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-18476/index.html

unodevops avatar Oct 17 '24 15:10 unodevops