You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I checked uWebSockets.js and I think it has the following problems to be used in Vite:
lack of minor platform support: it only supports Tier 1 platforms and there aren't any fallback implementations like we have with esbuild
does not have a builtin way to only install the binary needed for the platform it is ran in (e.g. 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.
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: uNetworking/uWebSockets#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
The text was updated successfully, but these errors were encountered: