Skip to content

One time lag when using drawString #10

@rolve

Description

@rolve

When drawString is used for the first time, performance suffers for a moment. This can lead to a visible lag in games, e.g. if drawString is used first for when a specific event happens.

It is unclear whether the lag stems primarily from the loading of a specific font (e.g. due to the creation of the metrics) or from using fonts for the first time in general (due to class loading or such). In the second case, a simple fix would be to use the respective classes when creating the GUI. Otherwise, we may want to allow preloading of fonts (and maybe also of images).

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