Bug 243521 - Iterate non-contiguous NSData regions instead of copying to contiguous buffer
Summary: Iterate non-contiguous NSData regions instead of copying to contiguous buffer
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alex Christensen
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-08-03 17:24 PDT by Alex Christensen
Modified: 2022-08-11 21:03 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Christensen 2022-08-03 17:24:37 PDT
CFNetwork gives us NSData which we then copy to SharedMemory, but we do so by calling NSData.data which copies the data to a newly allocated buffer in about 1/4-1/3 of the cases of my local browsing.  Iterating using enumerateByteRangesUsingBlock instead removes this copy and allocation
Comment 1 Alex Christensen 2022-08-03 17:25:45 PDT
Pull request: https://github.com/WebKit/WebKit/pull/2999
Comment 2 Radar WebKit Bug Importer 2022-08-10 17:25:15 PDT
<rdar://problem/98479750>
Comment 3 EWS 2022-08-11 21:03:49 PDT
Committed 253363@main (f6b396ad7232): <https://commits.webkit.org/253363@main>

Reviewed commits have been landed. Closing PR #2999 and removing active labels.