This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-11-03
Channels
- # beginners (50)
- # cider (6)
- # cljdoc (2)
- # cljs-dev (19)
- # clojars (2)
- # clojure (20)
- # clojure-dev (35)
- # clojure-italy (2)
- # clojure-norway (12)
- # clojure-uk (17)
- # clojurescript (7)
- # data-science (3)
- # datomic (10)
- # emacs (2)
- # events (1)
- # figwheel-main (2)
- # fulcro (8)
- # graphql (1)
- # juxt (3)
- # nrepl (4)
- # off-topic (23)
- # parinfer (1)
- # pathom (63)
- # re-frame (7)
- # reagent (1)
- # reitit (5)
- # ring-swagger (1)
- # shadow-cljs (23)
- # tools-deps (16)
@hannu.hartikainen @vale tested uris with the httprouter. It can do a lot for sanitizing the urls. e.g. strip out multiple slashes from mid-uri. Also, if the use case is for the frontend, some preprosessing needs to be done for the routes. This is what @vale started with, but I suggested the ring-default handler. For potential PRs (welcome!), I would like that the current case for doing exact matches would be as fast as now, so some option to preprocess the urls & incoming requests?
Maybe frontend should have a not-found/default handler too? I agree that exact matches should just work as fast as possible, as that’s easily over 99% of all requests.
btw, if someone has good insight about perf tuning, help welcome. Just run the Github API benchmarks from httprouter, reitit is 3-6x slower. Not bad for a dynamic lisp, but there is always room for improvement… https://github.com/metosin/reitit/blob/master/perf-test/clj/reitit/go_perf_test.clj