Bug 226644

Summary: Avoid wasteful large allocation in SpeechRecognitionRemoteRealtimeMediaSource::setStorage()
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: MediaAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: eric.carlson, ews-watchlist, glenn, jer.noble, peng.liu6, philipj, rbuis, sergio, sihui_liu, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=226253
Attachments:
Description Flags
Patch none

Chris Dumez
Reported 2021-06-04 08:41:58 PDT
Avoid wasteful large allocation in SpeechRecognitionRemoteRealtimeMediaSource::setStorage(). setStorage() sets m_buffer's size to the same size as the RingBuffer (2*sampleRate), only to resize it to the size of the rendering quantum (512) later in SpeechRecognitionRemoteRealtimeMediaSource::remoteAudioSamplesAvailable().
Attachments
Patch (1.98 KB, patch)
2021-06-04 08:43 PDT, Chris Dumez
no flags
Chris Dumez
Comment 1 2021-06-04 08:43:48 PDT
EWS
Comment 2 2021-06-04 10:14:31 PDT
Committed r278471 (238489@main): <https://commits.webkit.org/238489@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 430582 [details].
Radar WebKit Bug Importer
Comment 3 2021-06-04 10:15:21 PDT
Note You need to log in before you can comment on or make changes to this bug.