This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-12-17
Channels
- # adventofcode (96)
- # beginners (49)
- # boot (3)
- # cider (3)
- # cljs-dev (3)
- # clojure (112)
- # clojure-austin (2)
- # clojure-greece (35)
- # clojure-india (2)
- # clojure-sanfrancisco (1)
- # clojure-spec (1)
- # clojure-sweden (1)
- # clojurescript (27)
- # cursive (4)
- # data-science (1)
- # datomic (33)
- # defnpodcast (1)
- # duct (2)
- # editors (1)
- # emacs (4)
- # events (2)
- # figwheel (4)
- # fulcro (4)
- # hoplon (29)
- # instaparse (1)
- # jobs (1)
- # keechma (4)
- # lein-figwheel (2)
- # om (1)
- # parinfer (4)
- # perun (23)
- # reitit (11)
- # shadow-cljs (8)
- # specter (23)
- # uncomplicate (16)
@yogthos sure will! with this pace, pushing out feature per week, should be stable by end of year. I want to support both clj & cljs right from start, so need to port the ring-swagger for cljc too. Als, reitit-http
will be pedestal/interceptors, reitit-ring
ring/middleware. I guess Luminus stays with the Ring-stack? Both modules will have the same features.
One thing we chatted earlier was ability to make the middleware chains lazy: one could modify the chain at runtime (like the interceptor queueing). Here are some benchmarks, executing a chain of 10 no-op middleware / interceptor:
; Middleware (static chain) => 5µs
; Middleware (dynamic chain) => 60µs
; Interceptor (static queue) => 20µs
; Interceptor (context queues) => 30µs
; Pedestal (context queues) => 79µs
By default, the middleware chain is really fast, smal functions to the stack. Its an order of magnitude faster than pedestal chain (all logging turned off).
making the middleware chain modifiable at runtime makes it x10 slower. And in my test there was no initialization, if there would be mw argument parsing etc. it would be even slower.
Did few tests on how to create a fast interceptor runner, simplests runners (written in java) could be something like x3 slower than the mw-version. To support generic async (manifold, core.async, promesa) has some impact.
but: the mw-chain is always the fastest, interceptor-chain is more handy with async.
Trying to get the Pedestal people interested in creating a “Interceptor Spec” (like the Ring spec is today) that could be used with different interceptor libs. Currently, many version of the original, bit different and thus incompatible.
oh, that was 100-long chain. not from real life with chain of 10:
; Middleware (map, static chain) => 960ns
; Middleware (record, static chain) => 380ns
; Middleware (dynamic chain) => 6600ns
; Interceptor (static queue) => 2000ns
; Interceptor (context queues) => 3000ns
; Pedestal (context queues) => 8800ns