This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-11-30
Channels
- # beginners (126)
- # boot (2)
- # cider (6)
- # cljs-dev (46)
- # cljsjs (8)
- # clojure (122)
- # clojure-greece (57)
- # clojure-italy (6)
- # clojure-poland (3)
- # clojure-russia (2)
- # clojure-serbia (5)
- # clojure-spec (26)
- # clojure-uk (99)
- # clojurescript (39)
- # cursive (15)
- # datascript (7)
- # datomic (21)
- # dirac (7)
- # duct (1)
- # emacs (19)
- # fulcro (58)
- # garden (4)
- # graphql (15)
- # hoplon (2)
- # immutant (1)
- # instaparse (3)
- # jobs (5)
- # juxt (15)
- # klipse (4)
- # leiningen (2)
- # lumo (52)
- # off-topic (8)
- # om (27)
- # onyx (22)
- # other-languages (3)
- # portkey (2)
- # protorepl (2)
- # re-frame (7)
- # reagent (7)
- # ring (11)
- # rum (7)
- # shadow-cljs (114)
- # spacemacs (20)
- # specter (16)
- # test-check (5)
- # timbre (1)
- # unrepl (43)
- # yada (17)
hmm, it really seems like that - however I am not sure how can I avoid it except wrapping all the middleware by myself
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?
also, ring-defaults has some parameter-settings, which also are included in compojure-api defaults. Here are the chains: * https://github.com/metosin/compojure-api/blob/master/src/compojure/api/middleware.clj#L264-L290 * https://github.com/ring-clojure/ring-defaults/blob/master/src/ring/middleware/defaults.clj#L98-L117
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 😭@jazzytomato do you use lein-ring
? It brings extra (potentially) old deps at runtime, overriding the project setup. Updating to latest should help.
I don't use lein-ring
I think lein clean fixed it...
sorry, I'm a newbie 😄
thanks 🙇