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

Improve offline search cache #267

Open
Jikoo opened this issue Dec 28, 2024 · 0 comments
Open

Improve offline search cache #267

Jikoo opened this issue Dec 28, 2024 · 0 comments

Comments

@Jikoo
Copy link
Owner

Jikoo commented Dec 28, 2024

Offline search currently has a very small cache of only the most recent results.
This is particularly problematic for servers with large playerbases - cache misses will be frequent, resulting in thousands of wasteful system calls. We should instead move to a single larger cache on disk.

Pros:

  • Easily locate results of prior queries
  • Indexable for faster searching/matching

Cons:

  • Uses more disk space
    • Generally would be storing 2-4 strings per player - not a huge concern
  • Requires keeping a file open
    • Mitigated by the fact that offline matching would no longer open every single player file (admittedly, sequentially)

Another potential plan is to move offline name matching to a separate searching command, but more casual users (aka the majority of the users) will likely find this a nuisance.

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

No branches or pull requests

1 participant