~/talk

Transitioning to modern JavaScript

Talkat Chrome Dev Summit 2020 · 2020-12-09..12-10· [web-platform, javascript]
slides:none on file

Claim: legacy dependency code is one of the biggest web performance problems today, causing roughly 80 PB/month of extra bandwidth and an estimated 54,000 metric tons CO2. Measured examples show an async arrow function (21 bytes) transpiles to ~7 KB and executes >6× slower (62 VM instructions vs ~1100). NPM analysis finds median package syntax is ES5, <25% use newer syntax, and only ~9–11% use module/browser fields. Practical fix: publish modern exports, target ES2017 sweet spot, and ship dual bundles via module/nomodule or transpile built bundles.

AI-written summary · about

  1. 0:00Start
  2. 1:42Modern JavaScript
  3. 2:34Classes
  4. 2:59Block Scoping
  5. 3:15Destructuring
  6. 4:35Transpilation
  7. 6:35Which JavaScript?
  8. 6:59Estimated cost of Legacy JavaScript
  9. 8:03Why legacy is the default on npm
  10. 11:092. Need to support IE11? Opera Mini?
  11. 11:45Option 1: Compile Twice
  12. 12:45is a tax you don't have to pay
  13. 13:02Optimal bundle configurations
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.