Skip to content

Comments

Speed up loading language list in options#3498

Open
tobbi wants to merge 1 commit intomasterfrom
speed-up-language-loading
Open

Speed up loading language list in options#3498
tobbi wants to merge 1 commit intomasterfrom
speed-up-language-loading

Conversation

@tobbi
Copy link
Member

@tobbi tobbi commented Dec 30, 2025

Previously, tinygettext queried the entire search path for .po files and added those to the list of languages. With all the installed add-ons adding their paths to the tinygettext search path, this obviously caused an immense slowdown.

I've added an overload to the get_languages() method to tinygettext to only load .po files from the "locale" directory. We should only be looking there, anyway.

I've opened a PR on our tinygettext fork here: SuperTux/tinygettext#7

@tobbi
Copy link
Member Author

tobbi commented Dec 31, 2025

Note: After consulting with other people from the team, it is clear that the slowdown on Android isn't primarily due to us parsing too many physfs paths but rather, that we appear to be loading the entire data ZIP file into memory when loading languages (or something similar). Nonetheless, this will be an improvement on other OSes, probably.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant