What is your favourite book / resource for going deep with optimising JS/Three.js performance?

I want to learn how to properly benchmark and fix performance issues in our Three.js / JavaScript app, I’d love to know what resources you’ve found that have helped you the most.

I’m keen to go quite deep, as this is going to be an important issue for our project. Any great books that go through modern JS low levels in a clear way, and how they relate to perf?

I’ve already got a designer who focuses on optimizing our models as much as possible. I’m keen to learn what I can do on the client side.

Thanks all!

I want to learn how to properly benchmark and fix performance issues in our Three.js / JavaScript app

Usually devtools heap monitor and performance tools are sufficient to detect bottlenecks.

What is your favourite book / resource for going deep with optimising JS/Three.js performance?

It depends on the type of project you’d like to create. :sweat_smile: Optimisation of a product configurator will focus on entirely different aspects than optimisation of a game (and in both cases what you optimise may also depend on the context of your app / what you’d like to show to the user / what the user would care about / what and how they can interact with.)

[…] books that go through modern JS low levels […]

There aren’t really any low levels of javascript. Optimisation of JS generally comes down to 3 points (since those you can actually influence):

  1. Trigger garbage collection (GC) as rarely as possible (ie. don’t create objects when unnecessary.)
  2. Don’t leak memory (ie. remove references, otherwise GC won’t be much helpful.)
  3. If you need a complex algorithm - move it to a worker / backend whenever possible.