[SPIGOT-591] Activation range higher than defaults causes immense lag Created: 20/Feb/15 Updated: 17/Mar/15 Resolved: 20/Feb/15 |
|
| Status: | Closed |
| Project: | Spigot |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | Piotr Petrus | Assignee: | Thinkofname |
| Resolution: | Fixed | Votes: | 2 |
| Labels: | None | ||
| Attachments: |
|
| Description |
|
The empirical description of the bug is in the summary. Below is what we found in code and questions / suggestions where it could stem from. We found that while Spigot 1.7 was running fine with entity-activation-range:
animals: 128
monsters: 64
misc: 64
Spigot 1.8 caused immense lag. Lag is captured on the WarmRoast screen cap in attached files. We changed those settings to recommended ones by Spigot defaults. entity-activation-range:
animals: 32
monsters: 32
misc: 16
If you look at our WarmRoast screen, thing that creates the HashSets (bottom of the tree) is this method in Google's multimap: https://code.google.com/p/guava-libraries/source/browse/guava/src/com/google/common/collect/AbstractMapBasedMultimap.java#303 We think that code does the following: if no collection for that key is found, create a new collection, put the key there and return that collection. We found that Spigot is calling that method and it is all connected somehow to activation range of entities. Here what is going inside: 1. Every tick, for every world, this method is called ActivationRange.activateEntities(World world); This is all that we could piece together. I hope it’s not a total waste of your time – we do know that lowering those values resolves the issue but we’re still wondering why the change is so dramatic insofar requiring nerfing activation to 1-2 chunks. Best regards! PS: We’ll gladly provide more info, please ask us anything you think could help here. |
| Comments |
| Comment by Thinkofname [ 17/Mar/15 ] |
|
144 is pretty high, higher than vanilla I think |
| Comment by Piotr Petrus [ 17/Mar/15 ] |
|
Thinkofdeath Is there any way this bug still exists for animals? I bumped up animal activation to 144 and suffered bad lag. Lowering it back to 48 helped. |
| Comment by Piotr Petrus [ 20/Feb/15 ] |
|
I’m in awe. Thank you for fixing, so happy to have helped. |