End Portal Recipe (Fabric)

End Portal Recipe (Fabric)

35.8k Downloads

Random Village Names - big server lag spikes

zanecek opened this issue · 6 comments

commented

Minecraft version: 1.16.5
Forge version: 36.1.0
Environment: Singleplayer

Mod name: Random Village Names
Mod version: 1.1

Description

Big server lag spikes (about 500ms) periodically every few seconds.
Even at rest, after loading all the chunks...

https://spark.lucko.me/FkYQgHCCqd
com.natamus.randomvillagenames.events.SetVillageSignEvent.onPlayerTick() 97.21%

I use terraforged world generator.

commented

I have the same problem, using just Random Village Names (1.3) with Collective (2.58) and Areas (2.8) produces big lag spike every 8 seconds. MC version 1.16.5.
So removing Random Village Names jar fixes this, you can still just use Areas and manually name towns, and it won't lag. Maybe RVN just constantly tries to generate structures even if they are already generated?

commented

Same issue, but for 1.18.2 Forge using Random Village Names v1.6, Areas v2.9 and Collective v4.25. Forge version is 40.1.20.

commented

Same issue here on forge 1.18.2 tested on all forge versions (almost). Even starting a new world with no villages nearby there are still 100-200 ms lag spikes about every 8 sec or so, while my normal tps is 10-20. It gets worse the more I travel, the most i got were 2000+ ms spikes, and it wasnt a big world.

commented

Thanks for opening the issue and giving the mod a try! This has been fixed in version 2.0 of Random Village Names. It took a complete rewrite to fix the issue, but it should be a lot more efficient. I appreciate the patience and the detailed information. Apologies for the inconvenience and that it took so long.

https://www.curseforge.com/minecraft/mc-mods/random-village-names/files

commented

Based on the profiler results, it appears to be generating a lot of village structures, given how much time is being spent doing that.

  1. Are you getting a lot of new region files added to the world's region folder during those lag spikes?
  2. Can you try downgrading Random Village Names to 1.0 and running the profiler again?
  3. What full list of mods are you using in your instance?
commented

Hi. I start new world, I don't move. Only one village is in the world, near my spawn point.
No noticeable new world\region data are generated during time..
Lags are smaller, but they are. Exactly every 10s. See log:
[30Bře2021 00:28:15.065] [Server thread/DEBUG] [TerraForged/]: Search completed in 46ms
[30Bře2021 00:28:25.135] [Server thread/DEBUG] [TerraForged/]: Search completed in 61ms
[30Bře2021 00:28:35.164] [Server thread/DEBUG] [TerraForged/]: Search completed in 40ms
[30Bře2021 00:28:45.232] [Server thread/DEBUG] [TerraForged/]: Search completed in 60ms
[30Bře2021 00:28:55.285] [Server thread/DEBUG] [TerraForged/]: Search completed in 63ms
[30Bře2021 00:29:05.308] [Server thread/DEBUG] [TerraForged/]: Search completed in 37ms
etc...

Older, bigger world (5-10 villages):
[30Bře2021 01:28:48.653] [Server thread/DEBUG] [TerraForged/]: Search completed in 108ms
[30Bře2021 01:28:58.847] [Server thread/DEBUG] [TerraForged/]: Search completed in 248ms
[30Bře2021 01:29:09.053] [Server thread/DEBUG] [TerraForged/]: Search completed in 403ms
[30Bře2021 01:29:18.898] [Server thread/DEBUG] [TerraForged/]: Search completed in 201ms
[30Bře2021 01:29:28.948] [Server thread/DEBUG] [TerraForged/]: Search completed in 202ms
[30Bře2021 01:29:38.973] [Server thread/DEBUG] [TerraForged/]: Search completed in 176ms
etc...
Again no noticeable new world\region data.

"Random Village Names" version 1.0 is the same as 1.1.

Without "Random Village Names" no lags.
In log appears
[30Bře2021 01:46:01.766] [Server thread/DEBUG] [TerraForged/]: Search completed in 414ms
ONLY after "/locate village" command.
Do you use it every 10s in your mod?

I use my private modpack about 190 mods...:)