PaperMC / Paper

The most widely used, high performance Minecraft server that aims to fix gameplay and mechanics inconsistencies
https://papermc.io/
Other
9.98k stars 2.31k forks source link

(1.13.2) It takes 20-120ms to teleport a player to a different world. #2588

Closed ghost closed 3 years ago

ghost commented 5 years ago

Teleporting a player to a different world causes extra latancy within the server. This is not an issue of loading chunks because there is no latency teleporting a player to an unloaded area.

I have had reported lag varying between 20-120 milliseconds and has no other trigger to cause it to go higher or lower.

I am running paper-648 (1.13.2)

BillyGalbreath commented 5 years ago

Teleporting to another dimension does a permissions recalculation, which is a rather heavy task.

HexedHero commented 5 years ago

I feel like this is normal.

Tohya1 commented 5 years ago

was fixed in a 1.15 snapshot https://bugs.mojang.com/browse/MC-117914

kickash32 commented 5 years ago

That fix only concerns nether portals

BillyGalbreath commented 5 years ago

The issue isn't related to what Mojang fixed. That's a different bug not present in 1.13.

This issue, however, was introduced in 1.13 when command suggestions became a thing. The server checks your permissions and send your client the commands it has permissions to. This happens when your player enters a dimension, which includes logging in and changing dimensions.

I have a patch in my fork to disable this permissions recalculation. https://github.com/pl3xgaming/Purpur/blob/master/patches/server/0051-Don-t-recalculate-permissions-for-players-on-world-c.patch

If a core team member is interested, I could port it to paper in a PR.

The only side effect of disabling this recalculation is your command suggestions won't update until you relog if they were changed.

ghost commented 5 years ago

Well thanks for the information. I will keep this in mind if it causes severe lag with many players. Do you know of any way to disable permission recalculation via the paper/spigot/bukkit api? To clarify, this has nothing to do with nether portals because I am teleporting the player via the spigot api.

Brokkonaut commented 5 years ago

@BillyGalbreath I like that patch, but I would prefer to have the default set to "true", because disabling it has some maybe unwanted side effects.

Chew commented 3 years ago

Author is gone but appears to have been fixed in #3116. Thank you, mystery user.