C
C#3mo ago
Trou

Server sent event & React freezing the application

In my React project, I'm using SSE to receive 10 objects per second from the server, and I'm storing these objects in the Redux store. When the data size reaches 8000+ objects, the page freezes. However, when I fetch the same data using an HTTP GET request, I can handle up to 50000 objects without any issues, and the page doesn't freeze. What could be causing the page to freeze when using SSE How can I resolve this?
2 Replies
The Fog from Human Resources
How are you making that HTTP get request, curl? Also you should probably consider putting this data into chunks that sounds like a huge load, even if it's "only" 10 per second
Trou
TrouOP3mo ago
I send http requests with axios but not sure is it matters about splitting the data into chunks, the data coming in per second is already limited to 10-20 pieces on average, but when I do the exact same operation with socket or SSE, the page does not respond after a certain period of time, there is no problem when communicating with http request
Want results from more Discord servers?
Add your server