Potentially HUGE optimisation: Read/write to the scoreboard using the *saved* life count not the scoreboard one #3
Labels
No Label
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: smp/lifesteal#3
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Right now, each scoreboard is stored in a <String, Scoreboard> HashMap. This is a remnant of when the life count wasn't persisted on server reboots. Now we can just generate the scoreboards on-the-fly whenever they're updated, using the current life count from the persistent storage. Performance along with RAM impact (i.e. how much we save by not storing each scoreboard separately from Bukkit) should be tested. I have no idea how to do that, though, so could someone that actually knows what they're doing in Java provide some advice?
This actually wouldn't lower RAM usage that much. Because we're just storing a pointer to the scoreboard, the only danger of the current strategy is a memory leak - the garbage collector won't run on a scoreboard that Bukkit drops if we still have a pointer to it.