Optimized an inefficient web application's JavaScript, CSS and assets delivery, ensuring it runs at 60fps and achieves a PageSpeed score of at least 90.
Original project: https://github.com/udacity/frontend-nanodegree-mobile-portfolio
Optimized to:
- Receive gogle page score greater than 90
- Acheive FPS rate of 60 and pizza resize time of 5ms
- Check out the repository
- cd into dir, install node modules and run grunt
$> cd /path/to/your-project-folder/
$> npm install
$> grunt
- cd into dist folder & start server
$> cd /path/to/your-project-folder/dist/
$> python -m SimpleHTTPServer 8080
- Open a browser and visit localhost:8080
- Download and install ngrok to the top-level of your project directory to make your local server accessible remotely.
$> cd /path/to/your-project-folder
$> ./ngrok http 8080
- Disable google fonts
- Download hosted images locally
- Inline CSS
Tasks completed using grunt:
- Resize pizzeria image
- Compress all images
- Minify all JS + CSS + HTML
- In update position function, move property request outside for loop
- In changepizza function:
- Only make one selector query and save it as a variable
- Determine the dx and new width on only the first pizza becuase it will stay consistent across all pizza's and move it outside the for loop