I'm currently developing a crypto trading mobile application using React Native where I've integrated the free Binance WebSocket to fetch real-time market data. However, I'm encountering severe performance issues due to React Native being single-threaded.
When receiving data from the WebSocket on the main thread, the app's performance significantly degrades. For instance, after clicking on a button, the app takes an excessive 30 to 40 seconds to respond.
I'm seeking guidance on potential solutions or best practices to mitigate this performance bottleneck. Is there a way to efficiently handle real-time WebSocket data in React Native without affecting the app's responsiveness? Are there any threading strategies or optimizations that can be implemented to improve the app's performance while receiving real-time market data from Binance WebSocket?
Any insights, code snippets, or recommended libraries that could assist in optimizing the handling of real-time data within a React Native application would be greatly appreciated.
What I have tried:
I have tried to several method but failed to improve performance