Bug 226867 - [MSE] When currentTime is a large value, it takes time to process SourceBufferPrivate::evictCodedFrames().
Summary: [MSE] When currentTime is a large value, it takes time to process SourceBuffe...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-06-09 22:11 PDT by Toshio Ogasawara
Modified: 2021-06-13 18:50 PDT (History)
11 users (show)

See Also:


Attachments
patch (6.49 KB, patch)
2021-06-09 23:13 PDT, Toshio Ogasawara
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Toshio Ogasawara 2021-06-09 22:11:46 PDT
SourceBufferPrivate::evictCodedFrames() loops to evict frames in a unit of 30 seconds from MediaTime::zeroTime() to "currentTime - thirtySeconds".
In the case of that currentTime is very large (eg. 180,000,000), evictCodedFrames() loops huge times to complete the eviction process. (in the example, it loops 6,000,000 times.)
To make matters worse, the looping process is executed even if there is no MediaSample to be evicted in a track buffer.
That is a point which should be improved.
Comment 1 Toshio Ogasawara 2021-06-09 23:13:55 PDT
Created attachment 431050 [details]
patch
Comment 2 EWS 2021-06-10 13:50:47 PDT
Committed r278728 (238691@main): <https://commits.webkit.org/238691@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 431050 [details].
Comment 3 Radar WebKit Bug Importer 2021-06-10 13:51:22 PDT
<rdar://problem/79158285>
Comment 4 Toshio Ogasawara 2021-06-13 18:50:18 PDT
Thank you for the review.