web server?
Yeah, ring, compojure, etc.
And you suspect you might be blocking on your middleware?
@ben.sless Nope, I don't think there's any blocking going on. We checked pretty thoroughly.
I do think we're being quite slow with some things, though; just trying to figure out what those things are.
Then async profiler will serve you well.
Swapping from compojure to reitit+muuntaja will speed you up. ring-json uses slurp
and regular expressions, performance killer. I PRed it a few days ago to remove slurp
but still, switch to #reitit if you want speed. (also jsonista > cheshire)
@ben.sless We have reitit on the list to bring in! Based on some testing we did a few months ago, it gave us a 15% speed up in running all of our tests, which is a surprising amount of time we we're spending doing routing.
We're using jsonista already.
yeah, and when the server is under stress it compounds exponentially
Thanks for all the tips. 🙂
I have clj-async-profiler working from an HTTP endpoint now. Just digging into what's going on.
Best of luck! hope you find some performance lying on the floor for quick wins
Then write a blog post 🙃
hehe, maybe. It's been years since my last blog post. This type of stuff is typically quite fun to write about, though.
What I find very weird is that a quarter samples seem to include the JVM function compiler. This isn't anything I've seen in other JVM flamegraph articles, aside from one, which verified it's the JIT.
Do you typically see that?