www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - dlang-requests v0.9.0

Hello,

I just released v0.9.0 of dlang-requests. This is large 
performance improvement and code refactoring release. Nothing 
changed in API and everything should work as before (hopefully 
better and faster)

What's new:

1. Connection pool for each HTTPRequest structure added. This 
give huge performance gain if you repeatedly call rq.get/post/... 
and/or when redirects involved.

2. Cache for permanent redirects added to Request structure.

As result started from test results

------------------------------
Testing https://www.amazon.com
   Requests: 578 ms, 725 ╬╝s, and 2 hnsecs
   std.net.curl: 128 ms, 480 ╬╝s, and 6 hnsecs
------------------------------
------------------------------
Testing https://google.com
   Requests: 389 ms, 220 ╬╝s, and 7 hnsecs
   std.net.curl: 80 ms, 434 ╬╝s, and 3 hnsecs
------------------------------
------------------------------
Testing https://bing.com/
   Requests: 481 ms and 112 ╬╝s
   std.net.curl: 129 ms, 860 ╬╝s, and 9 hnsecs
------------------------------

we have

------------------------------
Testing https://www.amazon.com
   Requests: 540 ms, 527 ╬╝s, and 2 hnsecs
   std.net.curl: 135 ms, 558 ╬╝s, and 4 hnsecs
------------------------------
------------------------------
Testing https://www.google.com
   Requests: 76 ms, 981 ╬╝s, and 4 hnsecs
   std.net.curl: 67 ms, 35 ╬╝s, and 3 hnsecs
------------------------------
------------------------------
Testing https://www.bing.com/
   Requests: 108 ms, 557 ╬╝s, and 9 hnsecs
   std.net.curl: 132 ms, 256 ╬╝s, and 9 hnsecs
------------------------------

(amazon recognise curl and send very short reply, so for curl it 
work faster anyway)

See details here https://github.com/ikod/dlang-requests/issues/80

Please, post any bug reports and feature-requests on github.

dlang-request is HTTP/ftp client library, inspired by 
python-requests with goals:

small memory footprint
performance
simple, high level API
native D implementation

https://github.com/ikod/dlang-requests
Aug 16 2018