Skip to content

SKPaint and performance considerationsΒ #77

@andrey-shavelev

Description

@andrey-shavelev

Hello,

I have a performance issue with large amounts of text. That is to say, hundreds and thousands of labels on a large whiteboard. While investigating the performance of RichTextKit, I found out that caching of SKPaint objects and reusing them between draw iterations saves up to 50% of render time. I run it on macOS and also in blazor wasm.

At the moment, all SK* resources are created on the fly and disposed right away.
https://github.com/toptensoftware/RichTextKit/blob/beb262ed21087b1600837a56336900f2c24f3b3a/Topten.RichTextKit/FontRun.cs#L604C1-L605C50

Is there a chance they could be cached?

Regards,
Andrey

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions