60+ FPS Website Optimization
Project's goal was to optimize the site so it performs at 60 Frames per Second (FPS) by getting rid of all the jank when resizing and scrolling through the website.
Some challenges encountered were resizing the pizzas so it transitions seemlessly in less than 5 ms and scrolling performs at 60 FPS consistently. For this to happen I had to simplify the function
resizePizzas so it doesn't trigger forced synchronous layout (FSL). Other relevant changes were working on the function
updatePositions so it doesn't trigger FSL by first getting
scrollTop and then updating all elements later. Last, but not least, I think this is one of the most important fixes to get rid of all janks: updating
getElementsByClassName("mover") so it doesn't have to recalculate on every iteration.