You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the current method of looping through every folder and checking every player one by one, it can take a serious amount of time to fetch all those UUID's like that.
We have about 4600 inventory yml's in our system. On our first run it was running for more than half an hour and it still didn't even get half-way.
There however is a HTTP accessible API from mojang with which you can fetch multiple UUID's at the same time. Up to 100 even.
The time it took to convert our ~4500-4600 yml's was less than 1 minute. Including the hits that it didn't get.
[21:45:58 INFO]: [MultiInv] Enabling MultiInv v3.3.1
[21:45:58 INFO]: [MultiInv] MC 1.3 or above found, enabling version 2 XP handling.
[21:45:58 INFO]: [MultiInv] Older data folder detected. Converting users to UUID, please wait...
[21:46:11 INFO]: Username not in map : InvictusFortis
[21:46:12 INFO]: Username not in map : johndecker
[21:46:12 INFO]: Username not in map : DutchSynapse
[21:46:12 INFO]: Username not in map : TheUberdude14.yml.bak-2014-06-05-1630
[21:46:12 INFO]: Username not in map : qazeds12
[21:46:13 INFO]: [MultiInv] Conversion complete!
Compared to 30+ minutes (and me just shutting the server down because it was taking too long) this is blazingly fast. I'm sure that if you optimise the code a bit it could get even faster, but this will help other server owners with big servers just like this I suppose. There are obvious copy/paste issues like checking for the folder twice but this is just a POC, not a beauty contest :P.
The text was updated successfully, but these errors were encountered:
GuntherDW
changed the title
Use more efficient Name -> UUID conversion
Use a more efficient Name -> UUID conversion
Dec 30, 2014
With the current method of looping through every folder and checking every player one by one, it can take a serious amount of time to fetch all those UUID's like that.
We have about 4600 inventory yml's in our system. On our first run it was running for more than half an hour and it still didn't even get half-way.
There however is a HTTP accessible API from mojang with which you can fetch multiple UUID's at the same time. Up to 100 even.
By using evilimidget's UUIDFetcher (ready-to-implement code) the effects of this speedup really are enormous
His code can be found here : https://gist.github.com/evilmidget38/26d70114b834f71fb3b4
So then when I changed converToUUID() to something like this (Yes it can be optimised even further, but this is just to prove my point)
The time it took to convert our ~4500-4600 yml's was less than 1 minute. Including the hits that it didn't get.
Compared to 30+ minutes (and me just shutting the server down because it was taking too long) this is blazingly fast. I'm sure that if you optimise the code a bit it could get even faster, but this will help other server owners with big servers just like this I suppose. There are obvious copy/paste issues like checking for the folder twice but this is just a POC, not a beauty contest :P.
The text was updated successfully, but these errors were encountered: