|Summary:||Add a mode to ResourceLoader that takes SharedBuffers instead of raw pointers and lengths|
|Product:||WebKit||Reporter:||Brady Eidson <beidson>|
|Component:||Page Loading||Assignee:||Brady Eidson <beidson>|
|Severity:||Normal||CC:||abarth, andersca, ap, japhet, sam, webkit.review.bot|
|Version:||528+ (Nightly build)|
Description Brady Eidson 2013-03-13 19:10:49 PDT
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.
Comment 2 Brady Eidson 2013-03-13 23:32:16 PDT
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 3 Andy Estes 2013-03-13 23:54:38 PDT
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 4 Build Bot 2013-03-14 00:08:14 PDT
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
Comment 5 Brady Eidson 2013-03-14 00:20:16 PDT
(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.