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
Note: for support questions, please use one of these channels: stackoverflow or slack
You want to:
Have a stream that fires many times/second.
report a bug
Current behaviour
Works fine with iOS.
On Android it gives warning "Setting a timer for a long period of time, i.e. multiple minutes" - in reality from what I've read, setTimeout isn't handled well in RN Android and I think creating/clearing so many timeouts simply floods the thread.
The problem seems to be resetting clreaing/setting timeout for heartbeat every time we receive an event.
Steps to reproduce (if the current behaviour is a bug)
I'm not sure I can share our stream link publicly with which the lagging is visible in provided example. But if this problem appears severe enough, we can try to share it privately.
Expected behaviour
Receiving stream of events without lagging the whole thread.
Setup
OS: Android (RN 0.55.4, React 16.4.0)
socket.io version: 2.1.1
Other information (e.g. stacktraces, related issues, suggestions how to fix)
I've seen comments about using AlarmManager on Android for correct timeouts handling.
Has anyone else experienced such a problem? Is there a better solution?
Probably using socket.io natively would solve such problems, but there's no supported RN wrapper.
The text was updated successfully, but these errors were encountered:
Note: for support questions, please use one of these channels: stackoverflow or slack
You want to:
Have a stream that fires many times/second.
Current behaviour
Works fine with iOS.
On Android it gives warning "Setting a timer for a long period of time, i.e. multiple minutes" - in reality from what I've read, setTimeout isn't handled well in RN Android and I think creating/clearing so many timeouts simply floods the thread.
The problem seems to be resetting clreaing/setting timeout for heartbeat every time we receive an event.
Steps to reproduce (if the current behaviour is a bug)
If we flood this example with events, the app responds extremely slowly while receiving stream of events https://github.com/vinnyoodles/react-native-socket-io-example .
I'm not sure I can share our stream link publicly with which the lagging is visible in provided example. But if this problem appears severe enough, we can try to share it privately.
Expected behaviour
Receiving stream of events without lagging the whole thread.
Setup
Other information (e.g. stacktraces, related issues, suggestions how to fix)
I've seen comments about using AlarmManager on Android for correct timeouts handling.
Has anyone else experienced such a problem? Is there a better solution?
Probably using socket.io natively would solve such problems, but there's no supported RN wrapper.
The text was updated successfully, but these errors were encountered: