Additional options are pushing it to the edge. Has anybody heard of a fine library called PartyKit? Yeah. Yeah! PartyKit is awesome. It uses the edge, and it's a multiplayer, real-time. And I actually primarily work with real-time. I don't do fetches. It's all real-time. And it is unbelievably low latency. If you want to have multiplayers going at the same time, I recommend you check it out.
And it wouldn't be one of my talks if I didn't make the finest recommendation, which is use Canvas. Can I get a yeah for who uses Canvas? Oh, yeah. So if you're rendering a lot of things in React non-negotiably, like you can't virtualize it, you're going to have a bad time. I've had things where little indicators, there has to be like 2,000 of them showing on a whole ass page at a time, and you just can't virtualize that. And if you have 2,000 of those elements and they're constantly updating and stuff like that, you're going to have a really, really, really bad time in React, let alone just DOM. Using Canvas is great. You should try it out if you haven't. I have, like, six stuff rendering, and, like, under seven milliseconds. It's unbelievable. So yeah.
If you want to fix your performance, first measure it, then look into some of the tools that I showed you, and figure it out. Thanks for coming to my talk. Woo! Woo! Woo! Woo! Woo!
First question, any tips on how to avoid blocking the main thread and how to identify if and what is blocking it? Profile it, right? Yeah. Yeah, yeah, yeah. I mean, if you're having issues with the main thread being blocked, just do that profiler recording and you'll see it. It gets super duper red. It's red everywhere. Yeah. I feel your comment, like, it's super intimidating. The first time you open it, it's like no, no. But if you take a moment and take a deep breath and put on your big boy shoes, you'll be fine, right? I brought my big boy shoes today.
Comments