On Thu, 25 Feb 2021, Emil Engler via curl-library wrote:

I recently thought about implementing the syscall sendfile(2) into
libcurl to speed up downloads to a file.

An interesting idea, but one full of caveats.

sendfile would only work (effectively) for clear-text downloads using TCP (ie not TLS nor UDP and HTTP/2 isn't really done for it either and not compressed or chunked HTTP/1 either) but I still think the "downloads to a file (descriptor)" is the biggest limiting factor.

The only time libcurl knows that it downloads to a file is when the write callback is left at default and only CURLOPT_WRITEDATA is set, which not even the curl tool does...

I'm not dismissing the idea, but it certainly isn't entirely straight-forward.

--

 / daniel.haxx.se
 | Commercial curl support up to 24x7 is available!
 | Private help, bug fixes, support, ports, new features
 | https://www.wolfssl.com/contact/
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html

Reply via email to