# Slow response time

**URL:** <https://discourse.hanakai.org/t/slow-response-time/522>\
**Category:** questions\
**Created:** [August 25, 2019, 10:24pm UTC](https://discourse.hanakai.org/t/slow-response-time/522 "2019-08-25T22:24:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ivanbokii](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.hanakai.org/ivanbokii/32/409_2.png) [@ivanbokii](https://discourse.hanakai.org/u/ivanbokii)\
**Post date:** [August 25, 2019, 10:24pm UTC](https://discourse.hanakai.org/t/slow-response-time/522/1 "2019-08-25T22:24:13Z")

</div>

Hello friends. I’ve picked up Hanami a month ago and building a small side-project with it. I’ve noticed weird slow response time for a simplest request possible.

`get '/test', to: ->(env) { [200, {}, ['Hello from Hanami!']] }`

I’m running Puma server on localhost in prod. mode:  
`HANAMI_ENV=production bundle exec hanami server`

Puma logs shows that server responds within a very small period of time:

```json
{
    "app": "***",
    "severity": "INFO",
    "time": "2019-08-25T22:19:05Z",
    "http": "HTTP/1.1",
    "verb": "GET",
    "status": "200",
    "ip": "192.168.0.59",
    "path": "/test",
    "length": "18",
    "params": {},
    "elapsed": 0.002606994
}

```

But a browser or CURL give me ~300ms for this request. Can someone please help me. I absolutely love Hanami, but I can’t use it in production if it’s this slow 😥

It looks like it’s the same question posted here: [Creating an API with Hanami](https://discourse.hanakai.org/t/creating-an-api-with-hanami/459)  
but no answer was posted. Would appreciate any information!

---

<div class="post-metadata">

**Author:** ![ivanbokii](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.hanakai.org/ivanbokii/32/409_2.png) [@ivanbokii](https://discourse.hanakai.org/u/ivanbokii)\
**Post date:** [August 25, 2019, 10:34pm UTC](https://discourse.hanakai.org/t/slow-response-time/522/2 "2019-08-25T22:34:27Z")

</div>

alright, it’s much faster with `--no-code-reload`. Response time goes down dramatically

---

<div class="post-metadata">

**Author:** ![mereghost](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.hanakai.org/mereghost/32/255_2.png) [@mereghost](https://discourse.hanakai.org/u/mereghost)\
**Post date:** [August 27, 2019, 3:34pm UTC](https://discourse.hanakai.org/t/slow-response-time/522/3 "2019-08-27T15:34:28Z")

</div>

I can recommend you to use the `hanami-reloader` gem as it uses guard under the hood. It may introduce a small interval between changes being made and the code reloading, but it works way better.

Our original code reloading algorithm was… hacky.
