node.js - socket.io slow on mobile device
问题描述
I have a node.js app that sends live data to the client via socket.io (Websocket transport) to draw a canvas (the client receives and uses data to draw to canvas).
I use socket.io-client
to connect to the socket.io server.
This works fine (at least to an extent) on PC but very slow on mobile devices (that support WebSocket).
Note: App is hosted on Azure and I am saying most data on Local Storage for better performance.
What can be the cause of the lagging and frequent disconnection on mobile phones but good connections on PCs?
解决方案
推荐阅读
- r - 错误:在 R 中的 sparklyr 中收集字数时出现“在字符串中嵌入 nul”
- semantic-ui - 语义 UI - 如何将下拉菜单清除为默认值?
- ios - SKLabel 在分配给特定元素时未显示
- pdf - 谷歌脚本;不支持格式 application/pdf 到 application/pdf 的转换
- r - 这段 r 代码是连接两个表并创建一个图吗?
- python - 在numpy循环中,对矩阵的元素进行算术运算
- javascript - 在页面更改后将反应数据保留在反应中
- r - 在 ggplot (geom_line) 中手动调整线条颜色
- html - 如何在 R HTML UI 元素中为图像的全宽拉伸图像?
- c++ - 为什么 std::bit_width 为值 0 返回 0,它不应该返回 1 吗?