New issue
Advanced search Search tips

Issue 682691 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue webrtc:7060



Sign in to add a comment

RTCPeerConnection.getStats caching behavior

Project Member Reported by hbos@chromium.org, Jan 19 2017

Issue description

RTCPeerConnection.getStats stats dictionaries are based on underlying WebRTC objects that can be added, modified or removed.

The spec says some dictionaries should appear in the stats as soon as their object is added (e.g. "[RTCMediaStreamTrackStats] appears in the stats as soon as [MediaStreamTrack] is attached (via addTrack, via addTransceiver, via replaceTrack on an RTPSender object, or via being created on an RTPReceiver object).")

For performance reasons, getStats uses caching. This can result in dictionaries not appearing in the stats for a "cache lifetime" amount of time if getStats is called just before and after a "significant event" (add/remove) occurs.

When a "significant event" occurs, the next time getStats is called a new stats collection must occur for the affected objects.
The easiest thing to do is "on significant event: clear entire cache".
 

Comment 1 by hbos@chromium.org, Jan 26 2017

Blocking: -627816 webrtc:7060

Comment 2 by guidou@chromium.org, Mar 13 2018

hbos@: Is this still valid?

Comment 3 by hbos@chromium.org, Mar 14 2018

Still valid (and should not be archived) but nobody is complaining so this remains P-3.

Sign in to add a comment