gecko-dev/dom/media/mediasource/gtest
Chris Pearce 42fd2adbaa Bug 1558364 - Add MediaSpan and use it for TrackBuffersManager::mInputBuffer. r=jya
As seen in this profile of a Twitch replay: https://perfht.ml/2K9Ydb3 we can
often end up spending time in TrackBuffersManager::CodedFrameProcessing()
shaving off bytes from the front off TrackBuffersManager::mInputBuffer. This
requires all the remaining bytes to be memmove'd down to the start of this
array. Sometimes we have close to 1MB in that buffer, and when we're just
trying to consume a few hundred bytes, that becomes high overhead.

So intead of using this "slice off, shuffle down" approach change
TrackBuffersManager::mInputBuffer to be a new type MediaSpan, which maintains a
RefPtr to a MediaByteBuffer and a span defining the subregion of the buffer we
care about. This means the RemoveElementsAt(0,N) operation becomes basically
free, and we can eliminate a few other copies we were doing as well.

Differential Revision: https://phabricator.services.mozilla.com/D34661

--HG--
extra : moz-landing-system : lando
2019-06-14 02:10:09 +00:00
..
TestContainerParser.cpp Bug 1558364 - Add MediaSpan and use it for TrackBuffersManager::mInputBuffer. r=jya 2019-06-14 02:10:09 +00:00
TestExtractVPXCodecDetails.cpp Bug 1542146 - Apply the change with the option StatementMacros from clang-format-8 r=andi 2019-04-05 21:42:17 +00:00
moz.build