haskell-servant / haskell-servant/servant-js
jsForAPI + jQuery = TTFB 500 ms
- Dominant language
- Haskell
- Stars
- 23
- Forks
- 22
- PR merge metrics
- No merged PRs in 30d
Description
Hi!
I use `jsForAPI` for jQuery-based AJAX call:
```
apiAJAXCall :: Text
apiAJAXCall = jsForAPI api' jquery
```
where `api'` is an API from one single endpoint. After that I embed this text into ``-tag in the **index page** (it's important detail, see below).
It works perfectly, but I see that the first request is too slow: TTFB is ~500 ms (on `localhost`!). Important: **it's not AJAX-request for this endpoint, it's a request to index page**! Such a big delay occurs only for the first request to the **index page** (after app reload), all other requests are very fast. How can I fix it?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.