uno
uno copied to clipboard
perf: reduce SKPaint and SKPath allocations
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:
- [ ] Docs have been added/updated which fit documentation template (for bug fixes / features)
- [ ] Unit Tests and/or UI Tests for the changes have been added (for bug fixes / features) (if applicable)
- [ ] Validated PR
Screenshots Compare Test Runresults. - [ ] Contains NO breaking changes
- [ ] Associated with an issue (GitHub or internal) and uses the automatic close keywords.
- [ ] Commits must be following the Conventional Commits specification.
Other information
Internal Issue (If applicable):
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-18476/index.html
Can you please try to measure the perf improvement to see how much it helps?
@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.
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-18476/index.html
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-18476/index.html
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-18476/index.html
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-18476/index.html
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-18476/index.html
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-18476/index.html