Skip to content

Conversation

@feross
Copy link
Member

@feross feross commented Feb 8, 2017

From the ws docs:

"ws supports the permessage-deflate extension extension which enables
the client and server to negotiate a compression algorithm and its
parameters, and then selectively apply it to the data payloads of each
WebSocket message.

The extension is enabled by default but adds a significant overhead in
terms of performance and memory comsumption. We suggest to use
WebSocket compression only if it is really needed.

To disable the extension you can set the perMessageDeflate option to
false"

From the ws docs:

"ws supports the permessage-deflate extension extension which enables
the client and server to negotiate a compression algorithm and its
parameters, and then selectively apply it to the data payloads of each
WebSocket message.

The extension is enabled by default but adds a significant overhead in
terms of performance and memory comsumption. We suggest to use
WebSocket compression only if it is really needed.

To disable the extension you can set the perMessageDeflate option to
false"
Copy link
Member

@DiegoRBaquero DiegoRBaquero left a comment

Choose a reason for hiding this comment

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

Be it in ws or uws, it provides a performance/memory boost.

@DiegoRBaquero DiegoRBaquero merged commit 4c86e98 into master Feb 8, 2017
@DiegoRBaquero DiegoRBaquero deleted the disable-deflate branch February 8, 2017 16:04
@lpinca
Copy link
Contributor

lpinca commented Feb 8, 2017

@feross @DiegoRBaquero you might also want to disable clientTracking as it seems that bittorrent-tracker uses its own logic to track clients.

The clientTracking option defaults to true and when enabled clients are stored in an array in ws@1 and in a set in ws@2.

As you can imagine the complexity to remove a client when it disconnects is O(n) in ws@1.

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.

4 participants