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

> But Dan's point about stats is that we already have another problem about memory use increasing indefinitely. Stats for deleted objects are kept around forever:

>>    The general rule is that stats objects, once created, exist for the lifetime of the PeerConnection that contains them, even when the underlying object they report on is stopped or deleted. This is important in order to report consistently on short-lived objects and to be able to report totals over the lifetime of a PeerConnection.

Unless I'm missing something (possible), the memory usage should be proportional to the objects in a peerconnection.  unless the number of objects grows without bound, we won't have the stats growing without bound.  If you add a new track, there may/will be a new trackstats object as well - but not an infinite number.  Perhaps some of the candidate/transport objects might be proportional to the number of ICE restarts/renegotiations. 

The memory may be in use until the peerconnection itself has gone away. (Note: gone away doesn't mean closed.)    


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

Received on Wednesday, 16 August 2017 19:03:31 UTC