Massive lags upon island creation
See original GitHub issue### Description
Describe the bug
I already stated this problem in the discussion section on spigotmc. Whenever someone creates a new island, there is a lag spike of around 10 seconds, where the whole server just does nothing. The distance between the islands is 1000. This worked with ASkyblock and shouldn’t be a problem at all. I’m using the casual starter islands at the moment. The server is definitely powerful enough. Disabling the generation of the “end” island decreases the lag by around 5 seconds. The server is running on 1.15.2 paper (latest version, 98). Decreasing the paste speed to 16 didn’t help much / not at all. Decreasing the distance between islands from 1000 to 250 only reduces the lag a bit (one second, or two). Upon island creation the whole server lags, the scoreboard stops it’s animation (until island creation is done) and console says that the server is running behind. This whole issue is about the bSkyblock addon by the way.
#### Steps to reproduce the behavior
Any island creation causes this behavior. It doesn’t matter if you start out for the first time doing /is or if you reset your island using /is reset. Any way of island creation causes this lag, that usually lasts around 10 seconds, sometimes even more.
#### Expected behavior
The server shouldn’t lag at all. We are currently running ASkyblock on our 1.12.2 server. Island creation has never been a problem there. Even with around 30-60 players at the same time, island creation never lagged the server. A one second lag would be way better, but not enough. We can’t allow lags, especially of this kind, at all.
#### Screenshots and videos (Optional)
There is not much to take screenshots of. I only get one error message in the console, but this appears due to the server running behind.
### Environment Linux
##### BentoBox Version (Mandatory)
bentobox version
[15:32:22 INFO]: Running PAPER Invalid.
[15:32:22 INFO]: BentoBox version: 1.10.0-1.13.2
[15:32:22 INFO]: Database: JSON
[15:32:22 INFO]: Loaded Game Worlds:
[15:32:22 INFO]: bskyblock_world (BSkyBlock): Overworld, Nether, End
[15:32:22 INFO]: Loaded Addons:
[15:32:22 INFO]: Border 1.0.5 (ENABLED)
[15:32:22 INFO]: BSkyBlock 1.10.0 (ENABLED)
[15:32:22 INFO]: Chat 1.0.4 (ENABLED)
[15:32:22 INFO]: ControlPanel 1.7.0 (ENABLED)
[15:32:22 INFO]: IslandFly 1.7.0 (ENABLED)
[15:32:22 INFO]: Level 1.9.3 (ENABLED)
[15:32:22 INFO]: Likes 1.7.0 (ENABLED)
[15:32:22 INFO]: Warps 1.9.0 (ENABLED)
#### Plugins (Optional)
Plugins (45): AnimatedScoreboard*, BentoBox, ChangelogBot*, Citizens, CitizensCMD, ClearLag, CMI,
CombatLogX, CoreProtect, FakeOnlinePlayers*, FastAsyncWorldEdit, GCBanz*, GCBcast*,
gcBoosters*, gcEssentials*, GCForceLog*, GCPrefix*, JBU*, LastLoginAPI, LuckPerms, MineResetLite*,
Multiverse-Core, MVdWPlaceholderAPI*, Parties, PlaceholderAPI, PlayerPoints*, PlayerVaults*,
PlugMan, ProtocolLib, Sentinel, StaffEssentials*, SuperVanish, TradeMe, UUIDChanger*, Vault,
ViaBackwards, ViaRewind*, ViaVersion*, VoteParty*, Votifier*, WorldBorderAPI*, WorldEdit,
WorldGuard, WorldGuardEvents, WorldGuardExtraFlags
### Additional context (Optional)
The timings you asked for: https://timings.aikar.co/?id=a3522d1349054b5b851ee36889bf58ca
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:48 (24 by maintainers)
Top GitHub Comments
tastybento already mentioned that link somewhere earlier
Just FYI: Pretty sure this is where the bug was introduced: https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/browse/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java?at=8a66d4c7ac262b6c0a97e52a3caa08a93feb90aa#241
Old method:
Feb 2nd commit:
It appears that the
findNearestMapFeature
method is going off and searching hundreds of chunks. I’m not sure what the original method would have returned but trying an older 1.15.2 build revealed it only generated 25 chunks when trying to load a new chunk.We’ll just have to wait for the Spigot guys to fix it or find a workaround.