Optimization

Projected Time

About 30-45 minutes

Prerequisites

Understand that JavaScript goes into websites and that when you go to a website on a browser, the code needs to get sent to the browser and loaded, likely needing to make API calls to retrieve data.

Motivation

Users are fickle: website performance matters.

Objectives

Participants will be able to:

Materials

Lesson

Common Mistakes / Misconceptions

Code on the server-side (ie. backend code) doesn’t benefit from being minified because that code is not delivered to the user’s browser.

Independent Practice

Find a minifier online and test it out with some JavaScript code, like this JavaScript minifier.

Challenge

Look up the advanced optimization concepts introduced in the slides:

  1. Algorithm optimization
  1. Asynchronous I/O (input/output)
  1. Precaching

  2. Concurrency