[RFC] Lite javascript client #4393
Replies: 6 comments 11 replies
-
@darrachequesne hi I was about to ask a similar question before knowing you have such plan (Yes, Please!) So how do I compile the client code with WebSocket-only. I saw someone updated
It seems to work but I have doubt that such a simple replace would make the whole client codes work. |
Beta Was this translation helpful? Give feedback.
-
@darrachequesne I'm a fan of this library, and this would be really awesome. Do you have any updates on this? |
Beta Was this translation helpful? Give feedback.
-
OK, so I've implemented a WebSocket-only engine, which can be used instead of the one provided by the This reduces the size of the minified bundle by about 33%. Something like:
I'm wondering if we should publish as is, or remove some additional features to further reduce the size. @qiulang thoughts? |
Beta Was this translation helpful? Give feedback.
-
Would such client also improve performance (cpu / memory wise) in addition to size reduction benefits? |
Beta Was this translation helpful? Give feedback.
-
I'm currently investigating on the necessary to keep the HTTP pooling system. In our usecase, it would be abnormal that our users need it, so only having the websocket system should be worth. |
Beta Was this translation helpful? Give feedback.
-
Hey, can I help anyhow with this change? Happy to help with pushing this forward 🙏 |
Beta Was this translation helpful? Give feedback.
-
Hi everyone!
Do you think it would make sense to provide a WebSocket-only client?
Pro:
Current composition of the size of the bundle (10.6 kB min+gzip) :
Source: https://bundlephobia.com/package/socket.io-client@4.5.1
so they could directly use the new implementation.
Cons:
We could even go further and remove the multiplexing feature, implemented in the Manager class.
What do you think?
Beta Was this translation helpful? Give feedback.
All reactions