Warren Shea

Warren Shea’s Notes for Performance

Version: 20221211

Notable Performance Experts

Website Testers

JavaScript bundle testers

Core Web Vitals

LCP - Largest Contentful Paint

FID - First Input Delay

CLS - Cumulative Layout Shift

Preload Scanner

Invented in IE8, some resources are downloaded asynchronously/parallel. Resources in this scanner will always perform better than those that are not.
<img> is an example of a resource in that scanner.

For images below the fold:

Specific Code Performance and Benchmarking

MeasureThat.net: Compare performance of JavaScript code, e.g.

HTML:

<div id="testElement"></div>

JavaScript:

let el = document.querySelector('#testElement');

VS

let el = document.getElementById('testElement');

document.querySelector x 5,467,960 ops/sec ±0.57% (66 runs sampled)
document.getElementById x 39,677,211 ops/sec ±0.25% (69 runs sampled)