2 ms·
It does in terms of narrowing down why libcurl could be slow. Are you presupposing it is slow for some reason? Nearly all http libraries should be running at w
by sitkack 13y ago
It does in terms of narrowing down why libcurl could be slow. Are you presupposing it is slow for some reason? Nearly all http libraries should be running at wire speed which is << native | interpreted.
Showing curl and wget from the command would have been highly beneficial. Would you not have tested that before writing an HTTP client in C?
- Restful 13y agoI see your point here for some baseline but I'm opposed to the comment about adding implementation of every library under the sun.
- sitkack 13y agoI said nothing about an impl, I mean wget -vv http://localhost:8080/bigbin.bin --header="Range:bytes=1000-20000" -O test.out curl -vvv http://localhost:8080/bigbin.bin --header "Range: bytes=1000-200000" -o test.out Both of these got 350MB/s + for impl, it isn't terribly difficult In [2]: from requests import Request, Session In [3]: s = Session() In [8]: req = Request('GET', 'http://localhost:8080/bigbin.bin', headers = { 'Range' : 'bytes=1000-2000000' } ) In [9]: prepped = s.prepare_request(req) In [10]: %timeit resp = s.send(prepped) 1 loops, best of 3: 238 ms per loop All of these are faster than what he outlined. So there is some _other_ issue going on. His hand rolled http request is faster but not for the reason he thinks. Crack out some wireshark, not some code.