README [skip ci]
This commit is contained in:
parent
348e770ce6
commit
13fa72f1d1
1 changed files with 3 additions and 4 deletions
|
|
@ -873,15 +873,14 @@ If memory usage is a concern and you are downloading big files, choose
|
|||
holds the entire response in memory at once. Let's download a 200mb file with
|
||||
10mb heap size:
|
||||
|
||||
``` shell
|
||||
``` clojure
|
||||
$ bb -Xmx10m -e '(io/copy (:body (curl/get "http://ipv4.download.thinkbroadband.com/200MB.zip" {:as :stream})) (io/file "/tmp/200mb.zip"))'
|
||||
```
|
||||
|
||||
With `babashka.curl` this forks fine. However with `org.httpkit.client` that
|
||||
With `babashka.curl` this works fine. However with `org.httpkit.client` that
|
||||
won't work. Not even 190mb of heap will do:
|
||||
|
||||
``` shell
|
||||
|
||||
``` clojure
|
||||
$ bb -Xmx190m -e '(io/copy (:body @(org.httpkit.client/get "http://ipv4.download.thinkbroadband.com/200MB.zip" {:as :stream})) (io/file "/tmp/200mb.zip"))'
|
||||
Sun Nov 08 23:01:46 CET 2020 [client-loop] ERROR - select exception, should not happen
|
||||
java.lang.OutOfMemoryError: Array allocation too large.
|
||||
|
|
|
|||
Loading…
Reference in a new issue