-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Curl] Reduce unnecessary SharedBuffer creation by making CurlMultipa…
…rtHandle::didReceiveMessage take std::span<uint8_t> https://bugs.webkit.org/show_bug.cgi?id=262472 Reviewed by Fujii Hironori. Currently, a SharedBuffer is generated in CurlRequest::didReceiveDataCallback when receiving data from libcurl. However, if CurlRequest::didReceiveData performs CURL_WRITEFUNC_PAUSE processing, this SharedBuffer will be discarded without being used. Also, CurlMultipartHandle::didReceiveMessage performs a SharedBuffer to Vector conversion. This is a wasteful data conversion. For this reason, avoid converting to SharedBuffer at the time of CurlRequest::didReceiveDataCallback. * Source/WebCore/platform/network/curl/CurlMultipartHandle.cpp: (WebCore::CurlMultipartHandle::didReceiveMessage): (WebCore::CurlMultipartHandle::processContent): * Source/WebCore/platform/network/curl/CurlMultipartHandle.h: * Source/WebCore/platform/network/curl/CurlMultipartHandleClient.h: * Source/WebCore/platform/network/curl/CurlRequest.cpp: (WebCore::CurlRequest::didReceiveData): (WebCore::CurlRequest::didReceiveDataFromMultipart): (WebCore::CurlRequest::didReceiveDataCallback): * Source/WebCore/platform/network/curl/CurlRequest.h: * Source/WebCore/platform/network/curl/CurlRequestClient.h: * Source/WebKit/NetworkProcess/curl/NetworkDataTaskCurl.cpp: (WebKit::NetworkDataTaskCurl::curlDidReceiveData): * Source/WebKit/NetworkProcess/curl/NetworkDataTaskCurl.h: * Tools/TestWebKitAPI/Tests/WebCore/curl/CurlMultipartHandleTests.cpp: (TestWebKitAPI::Curl::toSpan): (TestWebKitAPI::Curl::TEST): Canonical link: https://commits.webkit.org/268801@main
- Loading branch information
Showing
9 changed files
with
60 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.