mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2025-01-30 04:02:04 +01:00
Parallelize user data load in web editor request (#2973)
This commit is contained in:
parent
327ccec02f
commit
82488140ee
@ -255,12 +255,13 @@ public class WebEditorRequest {
|
||||
stream.filter(uuid -> !users.containsKey(uuid))
|
||||
.sorted()
|
||||
.limit(MAX_USERS - users.size())
|
||||
.forEach(uuid -> {
|
||||
User user = plugin.getStorage().loadUser(uuid, null).join();
|
||||
.map(uuid -> plugin.getStorage().loadUser(uuid, null))
|
||||
.forEach(fut -> {
|
||||
User user = fut.join();
|
||||
if (user != null) {
|
||||
users.put(uuid, user);
|
||||
users.put(user.getUniqueId(), user);
|
||||
plugin.getUserManager().getHouseKeeper().cleanup(user.getUniqueId());
|
||||
}
|
||||
plugin.getUserManager().getHouseKeeper().cleanup(uuid);
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user