Re: [webrtc-stats] Is keeping stats around a memory problem?

I think memory or speed wise this is not a problem unless you have a server running for a REALLY long time and people connecting and disconnecting continuously.

I think not keeping old stats around is more of a tidiness problem, it's not nice if you getStats() and half of the things in there are not relevant anymore.

In any case, firing an event when the final version of a stats object is produced due to detachment makes sense, solves any cpu/memory problems (whether real problems or not), and is implementation-wise not harder. Internally stats collection has to occur on a detachment event or callback - whether we do "add to cache" or "fire JavaScript event" is same complexity.

-- 
GitHub Notification of comment by henbos
Please view or discuss this issue at https://github.com/w3c/webrtc-stats/issues/235#issuecomment-358318363 using your GitHub account

Received on Wednesday, 17 January 2018 14:20:37 UTC