digitalmars.D.learn - std.net.curl - get() is too slow
- Benji (4/4) Dec 20 2013 When I call get() function from std.net.curl,
- Brad Anderson (7/11) Dec 20 2013 Without doing any profiling I'd say this character concatenation
- David Nadlinger (3/7) Dec 20 2013 How do you benchmark the functions?
When I call get() function from std.net.curl, I notice it's extremely slow! Maybe 50 times slower than in Python.. Is there any better/faster alternative?
Dec 20 2013
On Friday, 20 December 2013 at 18:23:30 UTC, Benji wrote:When I call get() function from std.net.curl, I notice it's extremely slow! Maybe 50 times slower than in Python.. Is there any better/faster alternative?Without doing any profiling I'd say this character concatenation while decoding is probably a large source of any slowness. https://github.com/D-Programming-Language/phobos/blob/master/std/net/curl.d#L1908 Switching it to Appender or doing some sort of batch processing would probably help a lot. Even just a .reserve() would probably do wonders.
Dec 20 2013
On Friday, 20 December 2013 at 18:23:30 UTC, Benji wrote:When I call get() function from std.net.curl, I notice it's extremely slow! Maybe 50 times slower than in Python.. Is there any better/faster alternative?How do you benchmark the functions? David
Dec 20 2013