core-async

Ben Sless 2020-09-28T04:31:08.047900Z

web server?

jeaye 2020-09-28T05:38:35.048100Z

Yeah, ring, compojure, etc.

Ben Sless 2020-09-28T07:19:46.048300Z

And you suspect you might be blocking on your middleware?

jeaye 2020-09-28T20:12:04.048900Z

@ben.sless Nope, I don't think there's any blocking going on. We checked pretty thoroughly.

jeaye 2020-09-28T20:12:30.049100Z

I do think we're being quite slow with some things, though; just trying to figure out what those things are.

Ben Sless 2020-09-28T21:04:42.049300Z

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)

jeaye 2020-09-28T21:39:06.049500Z

@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.

jeaye 2020-09-28T21:39:26.049700Z

We're using jsonista already.

Ben Sless 2020-09-28T21:40:10.049900Z

yeah, and when the server is under stress it compounds exponentially

jeaye 2020-09-28T21:40:29.050100Z

Thanks for all the tips. 🙂

jeaye 2020-09-28T21:40:30.050300Z

I have clj-async-profiler working from an HTTP endpoint now. Just digging into what's going on.

Ben Sless 2020-09-28T21:40:59.050500Z

Best of luck! hope you find some performance lying on the floor for quick wins

Ben Sless 2020-09-28T21:41:11.050700Z

Then write a blog post 🙃

jeaye 2020-09-28T21:45:25.050900Z

hehe, maybe. It's been years since my last blog post. This type of stuff is typically quite fun to write about, though.

jeaye 2020-09-28T21:46:49.051100Z

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.

jeaye 2020-09-28T21:47:05.051300Z

Do you typically see that?