Skip to content

Conversation

@Jikoo
Copy link
Owner

@Jikoo Jikoo commented Jan 10, 2026

Trades a relatively small amount of disk space (about 50 bytes per player) and additional async processing post-login (which is generally a hot area for plugins already) in exchange for not relying on the server's user cache or having to load every single player from disk to check their name.

There is one behavioral change here - for the SQLite implementation, I opted to require the first character to match (case-insensitive) as it provides a massive speedup to the already-much-faster query.

TODO:

  • Expose PlayerLoader's ProfileStore getter and setter to allow third party implementation (and make sure to log w/ class when used!)
  • Consider refactoring JdbcProfileStore
    • Removed; it would have to be rewritten to handle connection pooling anyway.
  • Consider refactoring importer to allow importing from arbitrary other implementations
    • Requires a getAllProfiles method
  • Consider adding a method to get profile by UUID
    • Just get the player directly
  • Consider adding profile expiration
    • last_update exists for this
  • Consider WAL
    • WAL offers a not-insignificant performance improvement. During normal operations, we only ever write with the one connection. Needs extra handling during shutdown.

It may be a good idea to optimize the JaroWinkler implementation in a future PR - that's likely the largest bottleneck now.

Jikoo added 10 commits January 3, 2026 17:40
The SQLite exact online should be fine(tm) to use on the main thread.
Bit torn on queries being inline rather than all declared at the top of the file. I feel like it looks less clean, but also I kept having to scroll up and down to see which index was which.
Should probably autoformat this whole thing, but eh. Some of it is even uglier autoformatted.
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.

Replace OfflinePlayer or improve upon it Improve offline search cache Option to disable offline player matching

2 participants