Buffer large media XHRs in the NetworkProcess to reduce IPC overhead
<rdar://82406803>
Created attachment 437180 [details] Patch
Comment on attachment 437180 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=437180&action=review > Source/WebKit/WebProcess/Network/WebLoaderStrategy.h:94 > + static constexpr Seconds mediaMaximumBufferingTime { 50_s }; 50_s?
Comment on attachment 437180 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=437180&action=review > Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp:652 > + && m_response.expectedContentLength() > static_cast<long long>(1 * MB) I would put this check before isMediaMIMEType because it's a cheap integer comparison that's likely to fail. > Source/WebKit/NetworkProcess/NetworkResourceLoader.h:213 > + NetworkResourceLoadParameters m_parameters; I think it would be better to mark maximumBufferingTime as mutable rather than all the parameters as non-const.
(In reply to Peng Liu from comment #3) > Comment on attachment 437180 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=437180&action=review > > > Source/WebKit/WebProcess/Network/WebLoaderStrategy.h:94 > > + static constexpr Seconds mediaMaximumBufferingTime { 50_s }; > > 50_s? OMG. Nice catch.
Created attachment 437182 [details] Patch for landing
Created attachment 437198 [details] Patch for landing
Committed r282003 (241310@main): <https://commits.webkit.org/241310@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 437198 [details].