This is probably relatively simple, but unfortunatly it's not an easy thing to google.
A client has tasked me with making a little 404 page runner game, similar to the google dino game. It runs fairly well despite using a ton of css animation.
My big problem right now: every once in a while there is a 'Commit' task called that lags the game for a second. It's sometimes enough to make the player lose.
All I can tell is that it might be something to do with rendering the CSS. But google has turned up empty.
I would apreciate any tips on how to minimize the effects of whatever this is. Thank you!

Maybe you could inspect your code keeping 'The pixel pipeline' in mind -> https://web.dev/rendering-performance/
When animating on the web you want to keep the pipeline as short as possible.
For example: if you want to animate an element moving from left to right you could animate the
leftvalue but this will cause a layout recalculation followed by paint and composite. You could do the same thing by usingtransform: translateX(), this will only cause a composite recalculation which is much shorter.Maybe these articles also help: