mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2025-01-30 12:11:49 +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))
|
stream.filter(uuid -> !users.containsKey(uuid))
|
||||||
.sorted()
|
.sorted()
|
||||||
.limit(MAX_USERS - users.size())
|
.limit(MAX_USERS - users.size())
|
||||||
.forEach(uuid -> {
|
.map(uuid -> plugin.getStorage().loadUser(uuid, null))
|
||||||
User user = plugin.getStorage().loadUser(uuid, null).join();
|
.forEach(fut -> {
|
||||||
|
User user = fut.join();
|
||||||
if (user != null) {
|
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