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

Bad performance when rendering text in Android. #976

Open
yanakievv opened this issue May 9, 2024 · 1 comment
Open

Bad performance when rendering text in Android. #976

yanakievv opened this issue May 9, 2024 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@yanakievv
Copy link

Hello,

We're using skia-safe to render shapes and text on bitmaps in Android. Recently we decided to upgrade from previous 0.62.0 version, that we've been using for a while to the newest 0.72.0 (there's 73 now, but 72 was the newest at the time of upgrade) and after refactoring deprecated calls here and there, we observed really "laggy" behaviour when rendering text.

The quick solution that we found was to downgrade back to 0.70.0, because 0.71.0's release notes hinted that With milestone 122 the default font manager were removed from Skia. ... The replacement code got tested on the major desktop platforms and therefore may not work on other platforms like Android oder iOS.. And indeed, upgrading to 0.71.0 brings back the choppy behaviour when rendering text, while downgrading to 0.70.0 does not. Both versions are tested without any code changes to our rendering library that uses skia.

Are there any plans to investigate the issue so that Android clients can safely upgrade to latest skia version or any suggestions on what we can do on our end to ease out the slow text rendering in newer versions?

Cheers!

@pragmatrix
Copy link
Member

I've take a closer look on this one, but can't find anything wrong with the new FontMgr creation on Android. There is only one FontMgr for Android that loads system fonts, and it is being explicitly selected as the default in both Milestones if Android is targeted. I've also verified that the preprocessor variables are set properly in the function that creates the System FontMgr while testing compatibility with the latest Android NDK in #981.

I think we need some kind of a MRE / benchmark so that we can compare the performance or wait for more information.

@pragmatrix pragmatrix added the help wanted Extra attention is needed label May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants