Open privatenumber opened 6 months ago
Other benchmarks:
Reference to Vite v6 discussion: https://github.com/vitejs/vite/discussions/15886#discussioncomment-11010384
I checked uWebSockets.js and I think it has the following problems to be used in Vite:
optionalDependencies
)Even if these problems were solved, it has a big package size even for a single platform (5MB; ws is 143kB), so it would need to improve the perf significantly to make it worth.
Thanks for the checks, I opened https://github.com/uNetworking/uWebSockets.js/discussions/1120
Second point can be (partially) achieved with https://github.com/uNetworking/uWebSockets.js/issues/1112
Description
I learned about https://github.com/uNetworking/uWebSockets.js which is a faster alternative to ws.
Bun uses a fork of it for WebSockets, and based on these HTTP server benchmarks, uWebSockets.js via Node is actually faster than bun.
More benchmarks: https://github.com/uNetworking/uWebSockets/discussions/1415
I'm not sure how much of a bottleneck ws is, but it may be worth exploring.
Suggested solution
Explore adopting uWebSockets.js
Alternative
No response
Additional context
No response
Validations