Lag caused by Nether portals

wenzhan

New member
Apr 17, 2023
12
0
1
When a player builds a multi-dimensional entity XP farm, if both the Nether and the Overworld are kept loaded, no special circumstances will arise. However, if the Overworld is not loaded, and a mob enters a Nether portal every 20 seconds, the server will experience a brief lag every time an entity enters the portal. It is speculated that this may be due to the repeated triggering of chunks loading and unloading, which consumes a significant amount of performance and causes the server delay.

1.19.4
 
Last edited:

wenzhan

New member
Apr 17, 2023
12
0
1
When a player builds a multi-dimensional entity XP farm, if both the Nether and the Overworld are kept loaded, no special circumstances will arise. However, if the Overworld is not loaded, and a mob enters a Nether portal every 20 seconds, the server will experience a brief lag every time an entity enters the portal. It is speculated that this may be due to the repeated triggering of chunks loading and unloading, which consumes a significant amount of performance and causes the server delay.

1.19.4
When a nether portal has not been used within 15 seconds and an entity travels from the Nether to the Overworld during this time, the server will lag.
 

electronicboy

Administrator
Staff member
Dec 11, 2021
216
10
34
28
There really isn't much of a way to fix this; portals load a bunch of chunks on the main thread, best you can do is use a chunk loader of some form on the other side
 

wenzhan

New member
Apr 17, 2023
12
0
1
There really isn't much of a way to fix this; portals load a bunch of chunks on the main thread, best you can do is use a chunk loader of some form on the other side
Is there really no solution? Because I can use this and cause all servers using the paper core to lag by simply entering the overworld from the nether every 30 seconds. It's extremely frustrating. From my experiments, there is no lag when teleporting with other third-party plugins. Is it possible to load nether portals using async?
 

electronicboy

Administrator
Staff member
Dec 11, 2021
216
10
34
28
Is it possible to load nether portals using async?
theoretically yes, just a good chunk of work, however; issue comes in is that you'd break anything that relied on the behavior of portals

Plugins don't load anywhere near as many chunks when teleporting, and competent plugins will use the async teleport APIs
 

wenzhan

New member
Apr 17, 2023
12
0
1
theoretically yes, just a good chunk of work, however; issue comes in is that you'd break anything that relied on the behavior of portals

Plugins don't load anywhere near as many chunks when teleporting, and competent plugins will use the async teleport APIs
Get it. But I hope pro developers can pay more attention to this lag factor. There may be optimization methods to solve it in the future. Thanks again.