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

Decrease cpu load to 30%. #60

Closed
wants to merge 1 commit into from
Closed

Decrease cpu load to 30%. #60

wants to merge 1 commit into from

Conversation

EOT3000
Copy link
Contributor

@EOT3000 EOT3000 commented Oct 11, 2019

Need review, fixes #58

@Redned235
Copy link
Member

This doesn't actually resolve the problem, rather it's just a workaround.

@Tim203
Copy link
Member

Tim203 commented Oct 11, 2019

^

@@ -62,7 +62,11 @@ public void translate(ServerChunkDataPacket packet, GeyserSession session) {
levelChunkPacket.setChunkX(packet.getColumn().getX());
levelChunkPacket.setChunkZ(packet.getColumn().getZ());
levelChunkPacket.setData(payload);
session.getUpstream().sendPacket(levelChunkPacket);
try {
session.getUpstream().sendPacket(levelChunkPacket);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not how the connection being closed should be handled.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

then how should it

@Malfrador
Copy link

CPU usage is very low (1%) when flying around, but chunks randomly stop loading and in general the chunk loading is very very slow. In general it seems like the view distance is decreased. Chunks up to 4 chunks away from the player load fast, everything farther away does not load at all or loads very slow.
Also some chunks start flickering very rapidly.

@Redned235
Copy link
Member

CPU usage is very low (1%) when flying around, but chunks randomly stop loading and in general the chunk loading is very very slow. In general it seems like the view distance is decreased. Chunks up to 4 chunks away from the player load fast, everything farther away does not load at all or loads very slow.
Also some chunks start flickering very rapidly.

It’s because this doesn’t actually solve the problem. @EOT3000 if you come up with a solution, please open a new PR.

@Redned235 Redned235 closed this Oct 12, 2019
@Tim203
Copy link
Member

Tim203 commented Oct 12, 2019

The view distance doesn't decrease, because the server sends the chunks and decides how much you can see, we don't change that. Flickering is when the server sends a chunk update, this happens for example when walking far away from a chunk and coming back at it (and call the others unloaded). Those chunks will stay (for whatever reason) in memory until you switch dimension or quit. The issues can probably be fixed but anyway thanks for saying it.

Hellohi3654 added a commit to HelloGeyser/Geyser that referenced this pull request Sep 20, 2020
@ghost ghost mentioned this pull request Feb 2, 2022
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

Successfully merging this pull request may close these issues.

5 participants