Skip to content

DrawRect is Extremely CPU intensive #31

@EmperiorEric

Description

@EmperiorEric

I used this label in a game that was running 60fps. My entire game update loop ran about 40% of the CPU at the my intense parts. THLabel ran at 14%. Those percentages are over a minute of gameplay with the THLabel changing its text once a second.

I had to work around it with snapshots of THLabels for various words generated before the game starts.

However, looking at the DrawRect briefly I see some places for speed improvements. It will likely never be fast enough for 60fps rendering as I know Core Text can be extremely expensive. But every little bit of CPU we can save means better battery life under normal operating conditions.

As people fill this thread with ideas, I'll see if I can find time to implement a few.

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