Bug 243521

Summary: Iterate non-contiguous NSData regions instead of copying to contiguous buffer
Product: WebKit Reporter: Alex Christensen <achristensen>
Component: Page LoadingAssignee: Alex Christensen <achristensen>
Status: RESOLVED FIXED    
Severity: Normal CC: beidson, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

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.