Граф коммитов

6 Коммитов

Автор SHA1 Сообщение Дата
alwu 23c2b98a25 Bug 1565501 - use fallible memory allocation in MediaSpan. r=jya
Use fallible memory allocation in order to avoid the OOM issue.

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

--HG--
extra : moz-landing-system : lando
2019-07-18 11:02:26 +00:00
Chris Pearce 337355aa9c Bug 1558364 - Convert TrackBuffersManager::mPendingInput into a MediaSpan. r=jya
This allows us to avoid a (probably small) copy when we stash the pending input.

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

--HG--
extra : moz-landing-system : lando
2019-06-14 02:10:24 +00:00
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
Brindusan Cristian a7f24acb4b Backed out 2 changesets (bug 1558364) for build bustages at MediaSpan.h. CLOSED TREE
Backed out changeset 098ce3586133 (bug 1558364)
Backed out changeset 2e64d8db2b4b (bug 1558364)
2019-06-14 03:48:51 +03:00
Chris Pearce 8f2dd4a937 Bug 1558364 - Convert TrackBuffersManager::mPendingInput into a MediaSpan. r=jya
This allows us to avoid a (probably small) copy when we stash the pending input.

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

--HG--
extra : moz-landing-system : lando
2019-06-14 00:31:06 +00:00
Chris Pearce d5f83d4740 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 00:31:02 +00:00