Fork me on GitHub
#ring
<
2017-11-30
>
petr.mensik08:11:56

hmm, it really seems like that - however I am not sure how can I avoid it except wrapping all the middleware by myself

ikitommi11:11:38

I don’t think the ring-defaults itself is slow, it’s just a collection of things. Someone could bench the included mw separately and see if there are slow ones. I would guess it’s the static resource encoding inspector thingie that’s causing 98% of the computation. If so, you could take some parts of those for the api-routes and apply the site-stuff only for the static routes. Does that make sense?

ikitommi11:11:17

and, when done, some “good practise” example setup would be great.

jazzytomato16:11:04

I am trying to use compojure-api with spec tools but I get

Caused by: java.lang.NullPointerException, compiling:(ring/util/http_response.clj:1142:1) 
...
Can't import ring.util.response/get-charset, try updating to Ring 1.6.0+
my project looks like that
[ring/ring-core "1.6.3"]
                 [metosin/compojure-api "2.0.0-alpha15"]
and lein deps :tree only yields ring-core version 1.6.3 I can't figure out what's wrong 😭

ikitommi16:11:44

@jazzytomato do you use lein-ring? It brings extra (potentially) old deps at runtime, overriding the project setup. Updating to latest should help.

jazzytomato16:11:25

I don't use lein-ring

jazzytomato16:11:01

I think lein clean fixed it...

jazzytomato16:11:26

sorry, I'm a newbie 😄

ikitommi16:11:54

was about to suggest lein-clean :)