mirror of
https://github.com/metosin/reitit.git
synced 2025-12-16 16:01:11 +00:00
CHANGELOG & update perf tests
This commit is contained in:
parent
cb0a6e1888
commit
ed81c07da5
3 changed files with 6 additions and 3 deletions
|
|
@ -6,6 +6,7 @@
|
|||
* should only concern you if you are not using [Muuntaja](https://github.com/metosin/muuntaja).
|
||||
* the `r/routes` returns just the path + data tuples as documented, not the compiled route results. To get the compiled results, use `r/compiled-routes` instead.
|
||||
* new [faster](https://github.com/metosin/reitit/blob/master/perf-test/clj/reitit/impl_perf_test.clj) and more correct encoders and decoders for query & path params.
|
||||
* all path-parameters are now decoded correctly with `reitit.impl/url-decode`, thanks to [Matthew Davidson](https://github.com/KingMob)!
|
||||
* query-parameters are encoded with `reitit.impl/form-encode`, so spaces are `+` instead of `%20`.
|
||||
* correctly read `:header` params from request `:headers`, not `:header-params`
|
||||
* welcome route name conflict resolution! If router has routes with same names, router can't be created. fix 'em.
|
||||
|
|
|
|||
|
|
@ -92,9 +92,9 @@
|
|||
;; 200ns (4.8x)
|
||||
"httpRouter"
|
||||
|
||||
;; 77ns
|
||||
;; 700ns
|
||||
;; 890ns
|
||||
;; 77ns -> 120ns (decode path-params)
|
||||
;; 700ns -> 795ns (decode path-params)
|
||||
;; 890ns -> 1000ns (decode path-params)
|
||||
(title "reitit-ring")
|
||||
(let [r1 (map->Request {:request-method :get, :uri "/1/users"})
|
||||
r2 (map->Request {:request-method :get, :uri "/1/classes/go"})
|
||||
|
|
|
|||
|
|
@ -438,6 +438,8 @@
|
|||
;; 2316ns
|
||||
;; 819ns (prefix-tree-router)
|
||||
;; 723ns (segment-router)
|
||||
;; 702ns (before path-parameters)
|
||||
;; 806ns (decode path-parameters)
|
||||
(b! "reitit-ring" reitit-ring-f)
|
||||
|
||||
;; 2821ns
|
||||
|
|
|
|||
Loading…
Reference in a new issue