Skip to content

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

Open
@taublast

Description

@taublast

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions