# Julia HTTP.jl performance vs python requests

**URL:** <https://discourse.julialang.org/t/julia-http-jl-performance-vs-python-requests/60490>\
**Category:** General Usage\
**Tags:** http\
**Created:** [May 4, 2021, 12:31am UTC](https://discourse.julialang.org/t/julia-http-jl-performance-vs-python-requests/60490 "2021-05-04T00:31:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![serhii](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/serhii/32/13719_2.png) [@serhii](https://discourse.julialang.org/u/serhii)\
**Post date:** [May 4, 2021, 12:31am UTC](https://discourse.julialang.org/t/julia-http-jl-performance-vs-python-requests/60490/1 "2021-05-04T00:31:02Z")

</div>

Hello,

I am currently trying to port some of my python code to Julia.  
And after some benchmarking, I’ve noticed that Julia’s HTTP.jl performance is somewhat worse than python’s requests (370ms vs 240ms). This is probably due to the fact that I use “persistent connection” in python via requests.session and just plain HTTP requests for HTTP.jl. So, is there any way to get a similar performance in Julia?

---

<div class="post-metadata">

**Author:** ![StefanKarpinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stefankarpinski/32/24_2.png) [@StefanKarpinski](https://discourse.julialang.org/u/StefanKarpinski)\
**Post date:** [May 4, 2021, 3:35am UTC](https://discourse.julialang.org/t/julia-http-jl-performance-vs-python-requests/60490/2 "2021-05-04T03:35:29Z")

</div>

Try the [Downloads](https://github.com/JuliaLang/Downloads.jl) package (a standard library since Julia 1.6). It wraps libcurl and should be quite efficient. If you want to download multiple things concurrently, you can use tasks like this:

```julia
using Downloads: download

@sync for url in urls
    @async download(url)
end

```

This example isn’t terribly useful as is since it downloads each `url` to a temporary file and then discards the path of that file, but hopefully you get the idea.
