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

Reduce lag caused by getOfflinePlayer #114

Merged
merged 2 commits into from
Oct 9, 2022

Conversation

GroobleDierne
Copy link

As Bukkit.getOfflinePlayer(String name) is doing a blocking web call, it is very slow and results in server freezes when there are many players online and plugins like Towny try to perform transactions.
To reduce this impact I avoided calling Bukkit.getOfflinePlayer() multiple times in a row when the result can be stored.

To further address the problem, I would like to discuss with you what the use of accessing the balance of a player who never logged on is. And maybe suppress this feature or at least always return an empty balance without checking if the player exists.

@GroobleDierne
Copy link
Author

GroobleDierne commented Oct 2, 2022

@nikosgram
Copy link
Owner

That sounds amazing :) Thank you for looking into it. <3

@nikosgram nikosgram marked this pull request as ready for review October 9, 2022 01:37
@nikosgram nikosgram merged commit 072fbae into nikosgram:master Oct 9, 2022
@GroobleDierne
Copy link
Author

If you could add the hacktoberfest-accepted label to this PR it would be cool 😉 (https://hacktoberfest.com/)

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

Successfully merging this pull request may close these issues.

None yet

2 participants