I receive data from Pixhawk through MAVLink and I send it to a react application through a websocket. However, it overflows due too much data and the application gets laggy to a point that it is not usable anymore.
I want to be able to show all the Pixhawk registries and their sub data. This can be done once and stop the stream but since websocket has continues stream of data I haven't find a way to prevent that issue. Tested it with setInterval() to reduce the times of data being sent but it does not seem to have any effect. What I also had in mind is implementing GraphQl to it and requesting the data only once but I feel it is still not a good solution.
Do you have any suggestions with the approach I can take?