Closed
Bug 1374180
Opened 8 years ago
Closed 8 years ago
Blocks may not be correctly marked as used when MediaResourceIndex::ReadAt fills, and reads from, its own cache
Categories
(Core :: Audio/Video: Playback, enhancement)
Tracking
()
RESOLVED
FIXED
mozilla56
Tracking | Status | |
---|---|---|
firefox56 | --- | fixed |
People
(Reporter: mozbugz, Assigned: mozbugz)
References
Details
Attachments
(1 file)
Bug 1368837 (Add lockless cache to MediaResourceIndex) introduced a subtle change in the way MediaResourceIndex::ReadAt() interacts with the MediaCache:
In MediaResourceIndex::CacheOrReadAt, we attempt to mResource->ReadFromCache (instead of ReadAt), which in the case of a MediaCache-backed resource, means the MediaCache will *not* mark the corresponding block as used, which may have some impact on what will happen to that block, and when to download more data from that stream.
So I think we will need to have a way to notify the MediaCache when that cached data is being read, hopefully without re-introducing too much of the locking that bug 1368837 was designed to remove.
The simplest way (to be vetted) might be to just mark that block as used when it's first cached, so we don't need to get back to the MediaCache again.
I think marking it as read early is not a problem; in the worst case it may trigger the download of more data from the stream; but overall the rate of usage will remain similar.
Another option would be to notify the MediaCache when the cached data is actually read; and try to only send one notification per MediaCache block, to avoid going back to using one lock per read.
I will investigate further first, to try and understand the exact impact of bug 1368837, and then pick a solution...
(Suggestions welcome.)
Comment hidden (mozreview-request) |
Comment 2•8 years ago
|
||
mozreview-review |
Comment on attachment 8879774 [details]
Bug 1374180 - MediaResourceIndex won't use ReadFromCache, to keep MediaCache more consistent -
https://reviewboard.mozilla.org/r/151144/#review156502
Attachment #8879774 -
Flags: review?(cpearce) → review+
Pushed by gsquelart@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b51657a3495d
MediaResourceIndex won't use ReadFromCache, to keep MediaCache more consistent - r=cpearce
Comment 4•8 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox56:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in
before you can comment on or make changes to this bug.
Description
•