[tor-bugs] #29120 [Applications/Tor Browser]: Default value of media.cache_size (0) causes some media to load extremely slowly or become unplayable
Tor Bug Tracker & Wiki
blackhole at torproject.org
Mon Jan 21 11:26:30 UTC 2019
#29120: Default value of media.cache_size (0) causes some media to load extremely
slowly or become unplayable
-------------------------------------------------+-------------------------
Reporter: QZw2aBQoPyuEVXYVlBps | Owner: tbb-
| team
Type: defect | Status: new
Priority: High | Milestone:
Component: Applications/Tor Browser | Version:
Severity: Normal | Resolution:
Keywords: tbb-disk-leak, tbb-usability- | Actual Points:
website, TorBrowserTeam201901 |
Parent ID: | Points:
Reviewer: | Sponsor:
-------------------------------------------------+-------------------------
Comment (by QZw2aBQoPyuEVXYVlBps):
Replying to [comment:5 gk]:
> Thanks for the patch! I wonder what happens if the video is larger than
the available memory cache (or the latter is already filled up with other
cached stuff). Does the browser crash then? Or become unusable otherwise?
I tested using the video in the main ticket post, which is ~30mb (the
MemoryCache was hardcoded to 8192000 bytes in the patch).
As far as I can tell, it ''seems'' to properly reuse old memory once it
hits the cache limit, I could play through the whole video without
anything unusual happening, if I seeked back to the beginning after
playing through it, it would make a new HTTP request to fetch that data,
so it seemed to have properly fallen out of the cache.
One thing that should be looked into is if the MemoryBlockCache can safely
be used concurrently by multiple streams (as a "single global cache" like
the FileBlockCache is), if you look at the code here:
https://hg.mozilla.org/releases/mozilla-
esr60/file/256453759958ed9c2eb17a0764d2fcfd7f8e3323/dom/media/MediaCache.cpp#l737
You'll see that normally, a new MemoryBlockCache object is created for
each resource below {{{media.memory_cache_max_size}}}, they don't seem to
be reused across multiple resources like the FileBlockCache is.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/29120#comment:7>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list