Skip to content

[BUG] SKTypeface.CreateDefault(); very slow on Android #3213

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

Open
1 task done
taublast opened this issue Mar 24, 2025 · 2 comments
Open
1 task done

[BUG] SKTypeface.CreateDefault(); very slow on Android #3213

taublast opened this issue Mar 24, 2025 · 2 comments
Labels

Comments

@taublast
Copy link
Contributor

taublast commented Mar 24, 2025

Description

Hello, we just discovered that for some reason

public static SKTypeface CreateDefault ()
{
	return GetObject (SkiaApi.sk_typeface_create_default ());
}

looks to take too much execution time at app startup, might be an explanation or a bug, any thoughts?

Image

      <PackageReference Include="Microsoft.Maui.Controls" Version="9.0.22" />
      <PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="9.0.22" />
      <PackageReference Include="SkiaSharp.Views.Maui.Controls" Version="3.116.1" />
    <PackageReference Include="SkiaSharp.Skottie" Version="3.116.1" />

Initially was discovered here: taublast/DrawnUi#159 (comment)

Code

public static SKTypeface CreateDefault ()
{
	return GetObject (SkiaApi.sk_typeface_create_default ());
}

Expected Behavior

To exec faster

Actual Behavior

Slow exec

Version of SkiaSharp

3.116.0 (Current)

Last Known Good Version of SkiaSharp

3.116.0 (Current)

IDE / Editor

Other (Please indicate in the description), Visual Studio (Windows)

Platform / Operating System

Android

Platform / Operating System Version

No response

Devices

No response

Relevant Screenshots

No response

Relevant Log Output

Code of Conduct

  • I agree to follow this project's Code of Conduct
@taublast
Copy link
Contributor Author

At the same time, maybe it's just the first call to skia interop at app startup that is always the slowest one, whatever it is?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: New
Development

No branches or pull requests

2 participants
@taublast and others