Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 80bf5c2acfbc545488d962f3f4a316b0a5c73119
      
https://github.com/WebKit/WebKit/commit/80bf5c2acfbc545488d962f3f4a316b0a5c73119
  Author: Jean-Yves Avenard <j...@apple.com>
  Date:   2022-11-24 (Thu, 24 Nov 2022)

  Changed paths:
    M Source/WebKit/Shared/WebCoreArgumentCoders.cpp
    M Source/WebKit/UIProcess/WebURLSchemeTask.cpp
    M Source/WebKit/UIProcess/WebURLSchemeTask.h
    M Source/WebKit/WebProcess/WebPage/WebPage.cpp
    M Source/WebKit/WebProcess/WebPage/WebPage.h
    M Source/WebKit/WebProcess/WebPage/WebPage.messages.in
    M Source/WebKit/WebProcess/WebPage/WebURLSchemeHandlerProxy.cpp
    M Source/WebKit/WebProcess/WebPage/WebURLSchemeHandlerProxy.h

  Log Message:
  -----------
  Reduce memory usage when sending SharedBuffer across IPC
https://bugs.webkit.org/show_bug.cgi?id=248301
rdar://102201837

Pack small SharedBuffers across a single allocated SharedMemory.
A threshold of 4kB has been chosen through educated guesses.
Have URLSchemeTaskDidReceiveData use SharedBuffer when sending data to the 
content
process rather than a SharedBufferReference. The primary use of a 
SharedBufferReference
is to keep ownership of the allocated memory to the sending process. There's no
such requirement here.

Fly-by improvement, only perform a single memory allocation when passing a 
FragmentedShared made of multiple segments
on GTK and WPE platfom.

Reviewed by Kimmo Kinnunen.

* Source/WebKit/Shared/WebCoreArgumentCoders.cpp:
(IPC::useUnixDomainSockets):
(IPC::ArgumentCoder<WebCore::FragmentedSharedBuffer>::encode):
(IPC::ArgumentCoder<WebCore::FragmentedSharedBuffer>::decode):
* Source/WebKit/UIProcess/WebURLSchemeTask.cpp:
(WebKit::WebURLSchemeTask::didReceiveData):
* Source/WebKit/UIProcess/WebURLSchemeTask.h:
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::urlSchemeTaskDidReceiveData):
* Source/WebKit/WebProcess/WebPage/WebPage.h:
* Source/WebKit/WebProcess/WebPage/WebPage.messages.in:
* Source/WebKit/WebProcess/WebPage/WebURLSchemeHandlerProxy.cpp:
(WebKit::WebURLSchemeHandlerProxy::taskDidReceiveData):
* Source/WebKit/WebProcess/WebPage/WebURLSchemeHandlerProxy.h:

Canonical link: https://commits.webkit.org/256999@main


_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to