Fork me on GitHub
#reitit
<
2019-02-04
>
ikitommi16:02:55

yes, it’s the average nanos. the test matches all routes in the opensensors rest api suite and takes the average time for a match. It’s now 289ns for reitit-ring on my mac-book, while for compojure it’s 11615ns. Tried to make the routing trees as idiomatic per library for I could, hopefully done right. here are the tests https://github.com/metosin/reitit/blob/9af35647a87472cda67afc7cbca8127449e83e06/perf-test/clj/reitit/opensensors_perf_test.clj

kanwei16:02:28

that's pretty fast

kanwei16:02:40

i just benched a bunch of routes and in my app create-resource-handler is definitely the bottleneck

kanwei16:02:51

40microseconds to get a resource

kanwei16:02:20

since the current impl seems to just loop through all the resource files

ikitommi16:02:51

loop through? It shouldn't do that.

ikitommi16:02:02

But, it's from ring, ideas welcome to make it faster. Reading files from file system is much faster than from classpath, but it's not that portable.

kanwei17:02:00

never mind, I was looking at the index-files being looped