Add a mode to ResourceLoader that takes SharedBuffers instead of raw pointers and lengths. For platforms whose ResourceHandle::didReceiveData implementation gets some sort of buffer object (Mac, CF, qt, soup) this is an optimization that can be used today to avoid at least one data copy in many cases. For other platforms whose ResourceHandle::didReceiveData implementations get raw pointers and lengths themselves, it is possible that they have options to rewrite their platform layers to use some sort of shared buffer object or introduce special modes to SharedBuffer that could help encapsulate the same thing. Some day we might be able to get away from the current didReceiveData(char*, int) model entirely and work solely with SharedBuffers... but we can't do that today without introducing a "copy into a SharedBuffer" step to those other platforms.
In radar as <rdar://problem/13416953>
Created attachment 193073 [details] Patch v1 Patch to get the EWS ball rolling while I finish up layout tests locally (so far so good)
Comment on attachment 193073 [details] Patch v1 View in context: https://bugs.webkit.org/attachment.cgi?id=193073&action=review > Source/WebCore/ChangeLog:18 > + that can be a much bigger win then simply avoiding a copy. than, not then.
Comment on attachment 193073 [details] Patch v1 Attachment 193073 [details] did not pass win-ews (win): Output: http://webkit-commit-queue.appspot.com/results/17180106
(In reply to comment #4) > (From update of attachment 193073 [details]) > Attachment 193073 [details] did not pass win-ews (win): > Output: http://webkit-commit-queue.appspot.com/results/17180106 The failure is bizarre, as it implies willStopBufferingData is not in the ResourceHandleClient base class, which it is... but oh well. WIll fix before landing.
http://trac.webkit.org/changeset/145820