Kotlin Serialization Performance

Cathy Lennon · Friday Demos · July 31, 2026 · 4:07

Cathy shows the results of migrating serialization from Node to Kotlin: event loop lag on key endpoints dropped from \~300s peaks to near zero after a full rollout on July 23rd.

Transcript

This transcript is auto-generated. Names and product terms may be wrong.

  1. Do you see Omni? Yes. Yes, okay. It's more of a confirmation that I'm working than anything else, but I'm getting things done. And I just want to show the results of some of the things we've been doing. A few months ago, about a month ago, Jane and I were discussing a project we were working on — moving some of our serialization to Kotlin on the backend instead of Node, which would help with performance and so on.

  2. We've been gradually rolling this out via a feature flag for about a month, and last Friday we turned it on for everyone. That is, it has officially been launched. This in itself helped with performance and latency since we no longer do this in Node, but it also opened up opportunities to optimize our code. So I just want to show you some of the results of this.

  3. So, I need to remove the video window so it doesn't get in the way. It always gets in the way somewhere. Good. Um, these are graphs of the total event loop latency caused by certain endpoints that have been problematic in the past. This one, the pull request, was probably the most problematic and, you know, peaked over the last few months at up to 300 seconds sometimes.

  4. So you see a downward trend as we released certain features and checked the box for different customers, prioritizing the big ones to see improvements. And here, last Friday, we turned it on for everyone , and after that, the latency dropped to almost zero. There was a small jump yesterday, but it's less than a second, not in the 300-second range.

  5. Same with Git commit. We enabled this for problematic customers a little earlier, so you see that after the 10th the problem just goes away. Although that was less of a problem. And the same for branch. As the deployment progresses, the rate drops, and after the 23rd, last Friday, it simply goes down. Another interesting graph, I just wanted to look at it for a longer time.

  6. So these are the same graphs for the same endpoints, but at different times. Um, since the beginning of the year, you see that things have actually been really bad for a while. Um, about a thousand seconds, and then the readings dropped a bit. Um, I asked Claude about this , and he said I must have added some delay back then in anticipation of the event cycle.

  7. So you can thank Katie from the past on my behalf, because I completely forgot about it and didn't keep track. Um, then everything went well for a while, and then they probably released something else, which caused more work, problems, and now we're back to square one. Um, I should have prepared better numbers, but this is just another indicator.

  8. This is the literal execution time of the query. So in the worst case it was 60 seconds, now it's 30, which is also not very much, but you know, it's half as long. Same with P95: it was about 30 seconds , now it's a little less than 10, but, you know, it's like that. We still have some work to do, but we're in a better state now, and overall this has eliminated the latency from any serialization, and then we need to track all the other sources, um, and it's also a request to consider this when we're building something, so that we understand the implications of adding things and keep an eye on these graphs, seeing how it affects performance.

  9. Um, okay. I'm done. Okay.