Brandon Dail @brandondail.com · Mar 18

There are two main startup tasks for @discord.com: 1. Fetch and run all the JavaScript 2. Open a socket and get your data from the gateway Those were happening sequentially; now they are parallel! This improved P50 TTI by like 12%, over a second for many folks 📉 discord.com/blog/discord...

49 likes 2 replies

?

Replies

Hax · Mar 19

Good job, could you also add the rest of the optimizations that openasar.app made?

Brandon Dail · Mar 18

Opening the WebSocket connection is trivial; we already did that in an inline <script>. Sending the identify message was harder and has deps on code that was in our main bundle. We fixed this by actually shipping more JS 👺 a smaller bundle that loads first with just the modules needed to identify.