Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ocarina of Time: Increase function cache size for reading JSON data #2310

Merged
merged 1 commit into from
Oct 18, 2023

Conversation

dclaganiere
Copy link
Contributor

Ocarina of Time uses lru_cache() for caching JSON data being read for logic and hints with a maxsize of 13.

While there are 12 dungeon files and an overworld file, there are also Master Quest dungeons, glitched logic, etc. to cache as well.

For now, I removed the optional maxsize parameter, setting it to the default of 128.

From testing these changes on a multiworld with 9 OoT players, using various combinations of Glitchless, Glitchless MQ, and Glitched logic, the total files reads was brought from 126 to 40.

Removed optional maxsize parameter, setting it to the default of 128.
@eudaimonistic
Copy link
Contributor

@espeon65536 For your visibility.

@ScootyPuffJr1 ScootyPuffJr1 added the is: refactor/cleanup Improvements to code/output readability or organizization. label Oct 17, 2023
@espeon65536
Copy link
Collaborator

I have no idea why I left a cap on the cache when MQ was introduced. Looks fine to me.

@Berserker66 Berserker66 merged commit 1c7c83c into ArchipelagoMW:main Oct 18, 2023
12 checks passed
FlySniper pushed a commit to FlySniper/Archipelago that referenced this pull request Nov 14, 2023
Removed optional maxsize parameter, setting it to the default of 128.
Jouramie pushed a commit to Jouramie/Archipelago that referenced this pull request Feb 28, 2024
Removed optional maxsize parameter, setting it to the default of 128.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is: refactor/cleanup Improvements to code/output readability or organizization.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants