Fork me on GitHub
#reitit
<
2018-11-12
>
kanwei22:11:45

hey all - trying to switch to reitit on the backend side with reitit-ring

kanwei22:11:52

we still have some legacy compojure routes

kanwei22:11:18

when we do

(ring-handler reitit-app compojure-app)

kanwei22:11:34

calls in the compojure-app take 10x longer

kanwei22:11:49

Evaluation count : 51492 in 6 samples of 8582 calls.
             Execution time mean : 12.807315 µs
    Execution time std-deviation : 906.274775 ns
   Execution time lower quantile : 11.662179 µs ( 2.5%)
   Execution time upper quantile : 13.898343 µs (97.5%)
                   Overhead used : 6.323791 ns

Found 2 outliers in 6 samples (33.3333 %)
	low-severe	 1 (16.6667 %)
	low-mild	 1 (16.6667 %)
 Variance from outliers : 15.2220 % Variance is moderately inflated by outliers
Evaluation count : 1584 in 6 samples of 264 calls.
             Execution time mean : 314.422934 µs
    Execution time std-deviation : 26.718895 µs
   Execution time lower quantile : 296.329159 µs ( 2.5%)
   Execution time upper quantile : 351.203158 µs (97.5%)
                   Overhead used : 6.323791 ns

kanwei22:11:32

first bench is for GET'ting a route in the reitit-app, second bench is for a route (early on in the route tree) for the compojure-app

kanwei22:11:02

never mind i forgot i had the catch-all at the end of reitit-app 🙂

["/*" (reitit/create-resource-handler {:not-found-handler (constantly nil)})]