Bug 226644 - Avoid wasteful large allocation in SpeechRecognitionRemoteRealtimeMediaSource::setStorage()
Summary: Avoid wasteful large allocation in SpeechRecognitionRemoteRealtimeMediaSource...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-06-04 08:41 PDT by Chris Dumez
Modified: 2021-06-04 10:15 PDT (History)
11 users (show)

See Also:


Attachments
Patch (1.98 KB, patch)
2021-06-04 08:43 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 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().
Comment 1 Chris Dumez 2021-06-04 08:43:48 PDT
Created attachment 430582 [details]
Patch
Comment 2 EWS 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].
Comment 3 Radar WebKit Bug Importer 2021-06-04 10:15:21 PDT
<rdar://problem/78874517>