Closed ovhemert closed 4 years ago
I've done some experimentation with this and posted a branch with some debugging logs, a crude size limit on the events table and some possible fixes to some issues I found here - https://github.com/nearform/libp2p-introspection-ui/commits/events-perf-test-unrebased
See the commit comment of the last commit https://github.com/nearform/libp2p-introspection-ui/commit/411a3b9bd8f47b0daa7730e8ecd75b6246884fcb - there are a few things here that I think are causing it to not work as intended:
eventsBuffer
array length after assigning it by reference means the data's events array becomes empty on the next tickevents
array of one item still gets sent, so the logs still fill up with singular events hitting the datastoreWith those changes it kinda works, though I'll still need to do a little on the UI side to simplify the animations as they are still getting bunched up.
So for next steps:
@AlanSl did some tests for perf. looking good with the max limit rendering, but think the planned buffering for files is not needed.
LGTM
When ws server generates lot's of events, client/UI cannot handle that. This add's buffering of the ws messages and batch UI updates.