Thread overview | |||||
---|---|---|---|---|---|
|
December 20, 2013 std.net.curl - get() is too slow | ||||
---|---|---|---|---|
| ||||
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? |
December 20, 2013 Re: std.net.curl - get() is too slow | ||||
---|---|---|---|---|
| ||||
Posted in reply to Benji | 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. |
December 20, 2013 Re: std.net.curl - get() is too slow | ||||
---|---|---|---|---|
| ||||
Posted in reply to Benji | 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
|
Copyright © 1999-2021 by the D Language Foundation