# Reducing Genie latency

**URL:** <https://discourse.julialang.org/t/reducing-genie-latency/60550>\
**Category:** Performance\
**Tags:** genie\
**Created:** [May 4, 2021, 10:40pm UTC](https://discourse.julialang.org/t/reducing-genie-latency/60550 "2021-05-04T22:40:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jzr](https://avatars.discourse-cdn.com/v4/letter/j/eb9ed0/32.png) [@jzr](https://discourse.julialang.org/u/jzr)\
**Post date:** [May 4, 2021, 10:40pm UTC](https://discourse.julialang.org/t/reducing-genie-latency/60550/1 "2021-05-04T22:40:45Z")

</div>

After running

```julia
git clone https://github.com/GenieFramework/Genie.jl.git
cd Genie.jl

```

I run `GENIE_ENV=prod julia --project=.` and `]instantiate`.

Then I can run the web server.

```julia
julia> using Genie; route(()->"hello world", "/"); up()

```

Benchmarking

```julia
% hyperfine --warmup 1 -- 'curl 127.0.0.1:8000/'
Benchmark #1: curl 127.0.0.1:8000/
  Time (mean ± σ): 14.9 ms ± 0.2 ms [User: 2.2 ms, System: 1.4 ms]
  Range (min … max): 14.8 ms … 15.8 ms 161 runs

```

shows that it takes 15 ms to respond (after warmup), compared to \<5 ms in Python frameworks.

I tried using Profiler and flamegraphs but I was confused by at least two things: 1) the server is a long-running process, so I’m not sure how to profile its responses to requests separately from waiting for the next request. 2) The server process uses `Distributed` to distribute responses to workers and I don’t know to account for the multiple tasks. More generally, I’m not totally sure how to interpret what I see in the graphs.

The author of Genie has [labeled it](https://github.com/GenieFramework/Genie.jl/issues/361) “help wanted”. How would a Julia profiling expert get into this issue?

---

<div class="post-metadata">

**Author:** ![cesarmarinhorj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cesarmarinhorj/32/30948_2.png) [@cesarmarinhorj](https://discourse.julialang.org/u/cesarmarinhorj)\
**Post date:** [November 24, 2021, 1:41pm UTC](https://discourse.julialang.org/t/reducing-genie-latency/60550/2 "2021-11-24T13:41:43Z")

</div>

15 ms is nice to me…

---

<div class="post-metadata">

**Author:** ![paliro](https://avatars.discourse-cdn.com/v4/letter/p/bbe5ce/32.png) [@paliro](https://discourse.julialang.org/u/paliro)\
**Post date:** [May 17, 2022, 5:22pm UTC](https://discourse.julialang.org/t/reducing-genie-latency/60550/3 "2022-05-17T17:22:49Z")

</div>

In real world that will not be the case.

Can you please do a concurrency load test and post it here? Or Have you seen any benchmark on genie.jl concurrency test, please share.
