#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): I've gone ahead and made another patch with the above changes. In testing, it seems to work well, I believe this is a more "sane" solution than changing the global cache to a MemoryBlockCache. I monitored the debug logs for FileBlockCache and MemoryBlockCache, I never observed any FileBlockCache code being called, which is good. I also observed all the allocated MemoryBlockCache objects being properly destroyed after navigating away from pages with media content, so it seems this method doesn't leak any memory. I also tested what happens when the cache fails to initialize, it simply results it a media error ("No video with supported format and MIME type found."). I think this is probably acceptable since the only case where this would happen is if the user is extremely low on memory or has hit the {{{media.memory_caches_combined_limit_kb}}}, which shouldn't happen unless they have a large amount of tabs open containing media content. There's also really no alternative to it if we're going to be avoiding the disk cache at all costs. If this patch is used, I would also suggest bumping the default value of {{{media.memory_cache_max_size}}} to something slightly higher, as using this method also limits the amount of read-ahead buffer that can be stored for larger content, which can be slightly detrimental to playback compared to the file-backed cache. I would suggest at least doubling it to {{{16384}}}, {{{32768}}} is what I tested with though and it worked well. -- Ticket URL: <https://trac.torproject.org/projects/tor/ticket/29120#comment:10> Tor Bug Tracker & Wiki <https://trac.torproject.org/> The Tor Project: anonymity online
_______________________________________________ tor-bugs mailing list tor-bugs@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs