Open mzzsfy opened 8 months ago
Currently statsviz creates a new connection for each client/browser that connects to it. For each connection there's a once per second timer that gets the stats.
The orignal use case wasn't to have more than one client. Ok that's a bug. Thanks for reporting!
I was sure it was a feature and built our own locking around it 😆
Bugs, features... That's just different point of views 😅😅
But yes I think that statsviz should be restructured so that there's a single timer for N client connections. Shouldn't be too hard
Open 2 or more pages and you will see the phenomenon
code like this:
Here's the log with 3 pages opened![image](https://github.com/arl/statsviz/assets/43053461/5e5b6956-abef-4a9b-ba16-8d390ac3c694)