Skip to content

High memory usage in arcade.draw_text #658

Description

@markjoshua12

Bug Report

Calling arcade.draw_text with a string that's changing seems to rack up memory, probably because of the global_text_cache storing each text it draws.

Here's the test code:

(check memory usage with Task Manager)
https://pastebin.com/0hK8EgG2

A faster test (WARNING: Memory usage may become high pretty fast)
https://pastebin.com/bcawDr2D
(My computer actually froze running this test for a few minutes as the app used more than 1GB or memory)

Solution:

Either add an argument to disable caching, make the max cache size smaller (currently at 5000), or somehow make the cache use less memory (each entry in the cache is a Text class which contains a SpriteList)

Thanks
-Salami

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions