Skip to content
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

perf: reduce SKPaint and SKPath allocations #18476

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

ramezgerges
Copy link
Contributor

@ramezgerges ramezgerges commented Oct 15, 2024

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):

@github-actions github-actions bot added the area/skia ✏️ Categorizes an issue or PR as relevant to Skia label Oct 15, 2024
@ramezgerges ramezgerges changed the title Composition path clipping linux fix: shapes ignoring clipping sometimes on Linux Oct 15, 2024
@unodevops
Copy link
Contributor

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

@ramezgerges ramezgerges force-pushed the composition_path_clipping_linux branch from a136d51 to a207fd5 Compare October 16, 2024 16:08
@ramezgerges ramezgerges changed the title fix: shapes ignoring clipping sometimes on Linux perf: reduce SKPaint and SKPath allocations Oct 16, 2024
@MartinZikmund
Copy link
Member

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

@ramezgerges
Copy link
Contributor Author

@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.

@unodevops
Copy link
Contributor

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

@unodevops
Copy link
Contributor

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

@github-actions github-actions bot added the area/automation Categorizes an issue or PR as relevant to project automation label Oct 17, 2024
@unodevops
Copy link
Contributor

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

@unodevops
Copy link
Contributor

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

@unodevops
Copy link
Contributor

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

@unodevops
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/automation Categorizes an issue or PR as relevant to project automation area/skia ✏️ Categorizes an issue or PR as relevant to Skia
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants