[webkit-reviews] review granted: [Bug 232220] [CF] Reduce duplication and unneeded buffer allocations and copying in URL code, also remove unused methods and functions : [Attachment 442745] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Nov 9 13:46:36 PST 2021


Alex Christensen <achristensen at apple.com> has granted Darin Adler
<darin at apple.com>'s request for review:
Bug 232220: [CF] Reduce duplication and unneeded buffer allocations and copying
in URL code, also remove unused methods and functions
https://bugs.webkit.org/show_bug.cgi?id=232220

Attachment 442745: Patch

https://bugs.webkit.org/attachment.cgi?id=442745&action=review




--- Comment #7 from Alex Christensen <achristensen at apple.com> ---
Comment on attachment 442745
  --> https://bugs.webkit.org/attachment.cgi?id=442745
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=442745&action=review

> Source/WTF/wtf/cf/CFURLExtras.cpp:37
> +    auto buffer = static_cast<uint8_t*>(malloc(bytesLength));

Is it possible to use fastMalloc and then make a CFAllocator that calls
fastFree?

> Source/WebKit/Shared/cf/ArgumentCodersCF.cpp:646
> +    encoder << IPC::DataReference(bytesAsVector(url));

It seems like this could be even further optimized in the future because we
don't need the bytes in a vector.  We just need the bytes to go into the
encoder.


More information about the webkit-reviews mailing list