impress/src
Matchu 71215fe599 LRU caches to speed up outfit layer preload
The layer preloader already takes advantage of, and primes, the HTTP cache.

But we still do duplicate work, on every OutfitPreview render, to re-execute movie clip libraries, and create a movie clip to test for animations. The former is nontrivial cost, and the latter is often large cost. This can make even basic outfit changes slow, when there's no change to the movie clip layers and the player is paused!

Here, we add an LRU cache for movie clip libraries, and for the question of "is it animated?". This should speed up a number of places where we would reload the movie (including between toggling the item), and various changes that were triggering full movie clip rebuilds unnecessarily.

We _aren't_ solving here for the fact that toggling an animated item requires rebuilding the movie clip, which could conceivably be cached—but with some state management trickiness, because ideally it should be a separate clip for each context where it's being shown. Imo not yet worth the effort! (esp because I think users understand that toggling an animated item can be slow, whereas this was affecting _other_ actions way too much)
2021-04-16 20:16:56 -07:00
..
app LRU caches to speed up outfit layer preload 2021-04-16 20:16:56 -07:00
server Serve null outfit names for anon outfits 2021-04-16 19:26:07 -07:00
index.js inline index.css, omit unused fonts, preload hints 2020-05-18 00:56:46 -07:00
react-app-env.d.ts Finally finish TS setup, build works! 2021-02-02 21:38:57 -08:00