Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad client performance #451

Open
koskja opened this issue Aug 20, 2021 · 7 comments
Open

Bad client performance #451

koskja opened this issue Aug 20, 2021 · 7 comments

Comments

@koskja
Copy link
Contributor

koskja commented Aug 20, 2021

Description

The minecraft client experiences awful fps drops when loading new chunks. This is especially noticeable when spawning for the first time and when loading large amounts of blocks. This doesn't happen on vanilla servers.

Reproduction Steps

  1. Start the server
  2. Connect from a standard client
  3. Cross chunk borders
  4. Experience lag

Your Environment

  • Operating System: Windows 10

Additional Context

The server doesn't seem to be struggling at all and this bug persists even when the server is configured to only send 1 chunk per tick. To experience this effect to the maximum extent, go to x: -800 z: -1000 on the default seed. Notice the multiple fps drops on the second image.
normal
crossing_borders

@Defman
Copy link
Member

Defman commented Aug 20, 2021

This is most likely do to java being too slow at processing the incoming chunks. In other words, feather is too fast which results in a "dos" like attack on the client. We should add in some rate limiting for chunks or packets in general.

@TypicalDarkness
Copy link

TypicalDarkness commented Aug 21, 2021

I think this is related to the lighting engine. I had similar issues, but they went away when I installed the phosphor mod. As I understand it, the server currently sends light level 15 for every subchunk that has blocks in it, while the chunks without any blocks have light level 0. Maybe this causes some expensive calculations on the client. In that case, I would expect that they go away once the lighting is implemented properly.

@koskja
Copy link
Contributor Author

koskja commented Aug 22, 2021

image
I think this confirms your theory,

@itsTyrion
Copy link

So basically, the slow lighting engine doesn't usually blow up only because the Vanilla server is slow, too? Sounds about right for 1.14+

@koskja
Copy link
Contributor Author

koskja commented Sep 3, 2021

So basically, the slow lighting engine doesn't usually blow up only because the Vanilla server is slow, too? Sounds about right for 1.14+

Actually, the problem is that the client recalculates light for whatever reason when it receives invalid light data. When you generate a vanilla world and load it through feather, no client lag occurs.

2qar added a commit to 2qar/chowder that referenced this issue Mar 31, 2022
With these changes, it *feels* like the client is loading in
quicker and has less freezing as chunks are sent, but I'm
probably misremembering this[1] issue and completely making up
this speedup. Either way, that's one less packet to worry about
handling now :)

[1] feather-rs/feather#451
2qar added a commit to 2qar/chowder that referenced this issue Mar 31, 2022
With these changes, it *feels* like the client is loading in
quicker and has less freezing as chunks are sent, but I'm
probably misremembering this[1] issue and completely making up
this speedup. Either way, that's one less packet to worry about
handling now :)

[1] feather-rs/feather#451
@ashishagarwal2023
Copy link

I found a way that my whole client lags when ingame if you have smooth fps enabled (under performance in optifine idk about sodium)

@ashishagarwal2023
Copy link

Smooth fps gave me 0fps for long time I struggled then I tried disable it so it worked. It even somehow 0fps at the menus when ingame, such as video settings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants