Giter Site home page Giter Site logo

frontend-nanodegree-optimization's Introduction

Website Performance Optimization portfolio project

In this challenge, I optimized this online portfolio for speed. In particular, I optimized the critical rendering path to make pages render as quickly as possible by applying the techniques I picked up in the Critical Rendering Path course.

Getting started

To view optimizations, clone or download the repository and inspect the code (mainly index.html and views/js/main.js).

####Part 1: Optimized PageSpeed Insights score for index.html

These are the steps I took to achieve a Page Speed score of 90+:

1. Resized and compressed portfolio thumbnail images as small as possible
3. Inlined CSS to avoid render blocking
4. Removed Google Fonts
5. Added `async` to scripts and moved to bottom of `body` tag

####Part 2: Optimized frames per second in pizza.html

These are the steps I took to achieve a consistent frame-rate of 60fps when scrolling:

Refactored `updatePostions()` to avoid forced synchronous layout by:
	* Finding that there are the same four values of the `phase` calculation by logging values to the console
	* Using a `for` loop, putting these values into an array to reference instead of recalculating each time
	* Creating a separate `for` loop to update `left` property of each pizza (only 48 pizzas instead of 200)

These are the steps I took so the time to resize pizzas is less than 5 ms using pizza size slider:

Simplified `resizePizzas()` by:
	* Removing uncessary calculation of `dx` with `determineDx()` and `sizeSwitcher()`
	* Assigned new pizza width directly through `changePizzaSizes()`

frontend-nanodegree-optimization's People

Contributors

karashirl avatar durant-udacity avatar cameronwp avatar susansmith avatar safadurimo avatar walesmd avatar hkasemir avatar mrk-nguyen avatar nicolasartman avatar aaronbutler avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.