Menu
Home
Home
Quick Links
Recent Activity
What's New?
Help
Forums
Forums
Quick Links
Search Forums
Recent Posts
Wiki
Wiki
Quick Links
Minecraft Server Wiki
Page List
Members
Members
Quick Links
Notable Members
Current Visitors
Recent Activity
Vote
Menu
Log in
Sign up
Search titles only
Posted by Member:
Separate names with a comma.
Newer Than:
Search this thread only
Search this forum only
Display results as threads
More...
Useful Searches
Recent Posts
Minecraft Server Join One Of The Best Free Minecraft Servers
Home
Forums
Announcements
News / Server Information
Shops?
Reply to Thread
Name:
Verification:
Message:
<p>[QUOTE="Aqua, post: 113961, member: 6"]As you all noticed the shops have been closed for a few days because of laggy situations.</p><p>Today I have more information about the issue and what happens next. If you are not interested in the technical details you can go read the bottom of the post for the conclusion.</p><p>Details: </p><p>It appeared in the accountholder factory class the plugin would first try to obtain a user via using their ingame uuid and comparing that to offline players. If this case would throw an error it would simply loop ALL OfflinePlayer files untill it would find the correct file. </p><p>Considering we have over 15000 unique player files this can take a while. This action was done every time the money would have to be accessed. </p><p>When I did a few benchmark tests it appeared these few lines of code could take up to 450ms per action (almost half a second, and the server needs to run at 20 tick per second, so actions can take a max of 1/20th of a second, or 50 ms, not to cause lag).</p><p>The fix:</p><p>I modified the accountholder class and all commands to use player names, which are then run through my UUID fetcher, every time an action has to be done, my UUID fetcher will check if it already has the UUID and return this (which I can easily get OfflinePlayer from), or otherwise get the UUID from Mojang and stores it in the cache. (Your UUIDs are stored in cache automatically once you log in, to speed it up even more)</p><p><br /></p><p>Conclusion:</p><p>Shops are now open again and we will see how it goes the next few days. If you find any bugs or issues please post them in here so I can take a look at a possible fix.</p><p><br /></p><p>Have fun![/QUOTE]</p><p><br /></p>
[QUOTE="Aqua, post: 113961, member: 6"]As you all noticed the shops have been closed for a few days because of laggy situations. Today I have more information about the issue and what happens next. If you are not interested in the technical details you can go read the bottom of the post for the conclusion. Details: It appeared in the accountholder factory class the plugin would first try to obtain a user via using their ingame uuid and comparing that to offline players. If this case would throw an error it would simply loop ALL OfflinePlayer files untill it would find the correct file. Considering we have over 15000 unique player files this can take a while. This action was done every time the money would have to be accessed. When I did a few benchmark tests it appeared these few lines of code could take up to 450ms per action (almost half a second, and the server needs to run at 20 tick per second, so actions can take a max of 1/20th of a second, or 50 ms, not to cause lag). The fix: I modified the accountholder class and all commands to use player names, which are then run through my UUID fetcher, every time an action has to be done, my UUID fetcher will check if it already has the UUID and return this (which I can easily get OfflinePlayer from), or otherwise get the UUID from Mojang and stores it in the cache. (Your UUIDs are stored in cache automatically once you log in, to speed it up even more) Conclusion: Shops are now open again and we will see how it goes the next few days. If you find any bugs or issues please post them in here so I can take a look at a possible fix. Have fun![/QUOTE]
Your name or email address:
Password:
Forgot your password?
Stay logged in
Minecraft Server Join One Of The Best Free Minecraft Servers
Home
Forums
Announcements
News / Server Information
Shops?
Minecraft Server Join One Of The Best Free Minecraft Servers
Home
Forums
Announcements
News / Server Information
Shops?