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

Switch to sync zlib with 512k chunks, adjustable compression level #174

Merged
merged 2 commits into from Feb 5, 2022

Conversation

extremeheat
Copy link
Member

@extremeheat extremeheat commented Jan 31, 2022

  • Switch to synchronous zlib with 512kb chunks, fixes an memory fragmentation related to async zlib in nodejs. Should also increase throughput by blocking event loop alot less. Related: Zlib compression needs to be sync websockets/ws#1369 , zlib deflate results in a memory leak nodejs/node#8871 - not really a "memory leak" as GC does trigger, but memory starts to fragment and will crash the process if too many things in are in zlib queue
  • Customizable compressionLevel and batchingInterval in options
  • Emit 'connect_allowed' to match nmp, emitted after server ping
  • Fix minor race condition in player spawning

@extremeheat extremeheat merged commit 14af5fe into PrismarineJS:master Feb 5, 2022
@extremeheat extremeheat deleted the pairity branch October 7, 2023 18:44
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.

None yet

1 participant