Skip to content

Add disable-usercache-saving setting#323

Closed
sgdc3 wants to merge 1 commit into
PaperMC:masterfrom
sgdc3:master
Closed

Add disable-usercache-saving setting#323
sgdc3 wants to merge 1 commit into
PaperMC:masterfrom
sgdc3:master

Conversation

@sgdc3
Copy link
Copy Markdown
Contributor

@sgdc3 sgdc3 commented Jun 7, 2016

No description provided.

@aikar
Copy link
Copy Markdown
Member

aikar commented Jun 7, 2016

What condition would you ever want to turn this off? Note for performance paper has fixed saving causing lag by moving it to be async.

@sgdc3
Copy link
Copy Markdown
Contributor Author

sgdc3 commented Jun 7, 2016

Scenario:
offline mode server that restarts after every game (minigame server) with tons of different players playing.
It's useless in this situation. :)

@aikar
Copy link
Copy Markdown
Member

aikar commented Jun 7, 2016

the cache shouldnt be used in offline mode i dont think. The cache is all about cacheing lookups for online mode

does something make you believe this is being utilized a lot in offline mode? those uuids are based on player name

@sgdc3
Copy link
Copy Markdown
Contributor Author

sgdc3 commented Jun 7, 2016

xD Spigot even if in offline mode creates and USES the file to store useless UUIDs. I think you known that.

@sgdc3
Copy link
Copy Markdown
Contributor Author

sgdc3 commented Jun 7, 2016

Wait, i think this cache is still there in order to allow caching uuid requests from bungeecord in the case bungee is in online mode.

@sgdc3
Copy link
Copy Markdown
Contributor Author

sgdc3 commented Jun 7, 2016

So the only solution is to keep this configurable.

@sgdc3
Copy link
Copy Markdown
Contributor Author

sgdc3 commented Jun 7, 2016

How quick is the username to UUID hashing?

@aikar
Copy link
Copy Markdown
Member

aikar commented Jun 8, 2016

This isn't going to really achieve anything, since an offline server shouldn't even be making lookups.

This isnt going to stop the look ups, only abort saving them, which if it is looking up like I think it is, not saving them will hurt your performance as the point of the cache.

So if anything needs to be changed, its to ensure offline mode doesn't actually do lookups (and therefor doesnt cache), not anything to do with aborting the save.

@sgdc3
Copy link
Copy Markdown
Contributor Author

sgdc3 commented Jun 8, 2016

I'm sure that an offline-mode server doesn't contact mojang api but i'm also sure that the usercache.json file is still being used to store offline uuids (UUIDs generated using the player name). My question now is: could we disable the usercache completely on offline mode servers or it would cause performance issues (due to the username to offline UUID convertion)?

@aikar
Copy link
Copy Markdown
Member

aikar commented Jun 8, 2016

Why do you perceive it as a problem? It only saves a limited # of entries to disk.

What problem are you experiencing, so we can tackle that correctly.

This feels like the wrong solution to what ever problem you are seeing, and id rather us not clutter up the config file with a setting that will very likely only be changed by you.
When we add something to a config file, it makes people wonder if they change it ,and we could end up with misinformation spreading telling people to disable it with bad consequences.

@aikar
Copy link
Copy Markdown
Member

aikar commented Jun 8, 2016

another thing Z750 just mentioned, this is already doable by setting spigot.yml user cache cap to 0.

So im going to close this, but feel free to join us on IRC to discuss other ideas for improvements around whatever issue made you think this would help.

There may be room for improvement, but this doesn't seem to help anything.

@aikar aikar closed this Jun 8, 2016
@jiongjionger
Copy link
Copy Markdown

One more question, usercache is no help to offine mode? @aikar

@sgdc3
Copy link
Copy Markdown
Contributor Author

sgdc3 commented Jun 8, 2016

@aikar I didn't know that, thank you ;)

@jiongjionger It seems to be useless in offline mode, yes.

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.

3 participants