mirror of
https://github.com/webtorrent/bittorrent-tracker.git
synced 2025-01-19 04:31:36 +00:00
perf: disable perMessageDeflate
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"
This commit is contained in:
parent
fb751d7c96
commit
71bd413980
@ -118,7 +118,7 @@ function Server (opts) {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
self.ws = new WebSocketServer({ server: self.http })
|
self.ws = new WebSocketServer({ server: self.http, perMessageDeflate: false })
|
||||||
self.ws.address = function () {
|
self.ws.address = function () {
|
||||||
return self.http.address()
|
return self.http.address()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user