Upgrade to Pro — share decks privately, control downloads, hide ads and more …

🇺🇸 iJS New York 2026 (Sept 30 ⋅ 12:00 pm)

🇺🇸 iJS New York 2026 (Sept 30 ⋅ 12:00 pm)

Web Performance APIs That You (Probably) Never Knew Existed

Responsiveness to user interaction is crucial for modern web apps, and we’ve all heard about many fantastic tools for measuring and optimizing performance.

However, we no longer have to rely entirely on pre-built dashboards to understand performance. Browsers already expose a rich set of native performance APIs that let us go deeper.

In this talk, we’ll explore lesser-known platform primitives for measuring responsiveness and diagnosing bottlenecks. From observers and timing APIs to scheduling primitives and resource hints, and navigation improvements like View Transitions.

Be ready to turn your browser into a performance toolkit and build performance metrics that reflect what your users really care about.

Avatar for Matheus Albuquerque

Matheus Albuquerque PRO

September 30, 2026

More Decks by Matheus Albuquerque

Other Decks in Programming

Transcript

  1. Hello, New York! 👋 🇺🇸 WEB PERFORMANCE APIS THAT YOU

    (PROBABLY) NEVER KNEW EXISTED • SEPTEMBER 30, 2026.
  2. WEB PERFORMANCE APIS THAT YOU ( PROBABLY ) NEVER KNEW

    EXISTED MATHEUS ALBUQUERQUE • @ythecombinator
  3. 𝕏 Matheus Albuquerque ↝ 👨💻 STAFF SWE @ MEDALLIA ↝

    ⚛ CHAIR @ REACT SUMMIT NYC ↝ ⚡ GOOGLE DEVELOPER EXPERT ↝ YTHECOMBINATOR
  4. THIS TALK PRESENTS… ↝ PREAMBLE ↝ MEASURING WITH THE PLATFORM

    ↝ IMPROVING WITH THE PLATFORM ↝ CLOSING THOUGHTS
  5. MEASURING WITH THE PLATFORM GENERAL STUFF TIMING VISIBILITY STATE •

    INTERSECTION OBSERVER • USER TIMING • EVENT TIMING • RESOURCE TIMING • LAYOUT INSTABILITY SERVER TIMING • ELEMENT TIMING PROFILING SENSORS LONG TASKS • LONG ANIMATION FRAMES • SELF NETWORK STATUS • BATTERY STATUS • COMPUTE PROFILING • MEMORY USAGE PRESSURE
  6. WEB PERFORMANCE APIS THAT YOU (PROBABLY) NEVER KNEW EXISTED REACT:

    INTERNALS AND ADVANCED PERFORMANCE PATTERNS/ VISIBILITY STATE
  7. PAGE VISIBILITY: IDEAS ↝ CANCEL POLLING LOOPS, TIMERS, AND BACKGROUND

    NETWORK REFRESHES WHEN THE TAB BECOMES HIDDEN. ↝ PAUSE VIDEO, AUDIO, AND ANIMATION LOOPS WHEN THE USER ISN’T ACTIVELY WATCHING THE PAGE. ↝ RESUME PROGRESSIVE DOWNLOADS OR DYNAMIC IMPORTS WHEN THE PAGE BECOMES VISIBLE AGAIN.
  8. PAGE VISIBILITY: IDEAS ↝ STOP REFRESHING DASHBOARDS OR LIVE DATA

    FEEDS WHILE THE TAB IS BACKGROUNDED. ↝ SEND ANALYTICS RELIABLY AT SESSION END WHEN VISIBILITY BECOMES HIDDEN. ↝ SILENCE NOTIFICATIONS OR SOUNDS WHEN THE DEVICE SCREEN LOCKS OR THE TAB LOSES VISIBILITY.
  9. INTERSECTION OBSERVER: OVERVIEW const onIntersection (entries) { for (const entry

    of entries) { if (entry.isIntersecting) { console.log(entry); } } }; const observer new IntersectionObserver(onIntersection); > = = = observer.observe(document.querySelector('#target'));
  10. INTERSECTION OBSERVER: IDEAS ↝ INITIALIZE EXPENSIVE RENDERING PIPELINES (CHARTS, CANVAS,

    WEBGL) ONLY WHEN NEEDED. ↝ LAZY-LOAD IMAGES, IFRAMES, AND ROUTE BUNDLES WHEN THEY APPROACH THE VIEWPORT. ↝ DELAY LOADING THIRD-PARTY WIDGETS (MAPS, VIDEO EMBEDS, CHAT CLIENTS) UNTIL VISIBLE. ↝ CONTROL MEDIA PLAYBACK DEPENDING ON VISIBILITY.
  11. INTERSECTION OBSERVER: IDEAS ↝ RENDER/HYDRATE COMPLEX UI COMPONENTS ONLY WHEN

    THEY BECOME RELEVANT. ↝ TRIGGER ANALYTICS EVENTS WHEN USERS ACTUALLY SEE IMPORTANT UI SECTIONS. ↝ MEASURE HOW LONG ELEMENTS REMAIN VISIBLE (E.G., AD IMPRESSIONS).
  12. WEB PERFORMANCE APIS THAT YOU (PROBABLY) NEVER KNEW EXISTED REACT:

    INTERNALS AND ADVANCED PERFORMANCE PATTERNS/ LAYOUT INSTABILITY
  13. LAYOUT INSTABILITY: OVERVIEW ↝ MANY WEBSITES HAVE DOM ELEMENTS SHIFTING

    AROUND DUE TO CONTENT LOADING ASYNCHRONOUSLY. ↝ THIS API ALLOWS YOU TO: ↝ MEASURE REAL CLS VALUES IN PRODUCTION. ↝ IDENTIFY THE EXACT DOM ELEMENTS RESPONSIBLE FOR LAYOUT INSTABILITY. ↝ IGNORE EXPECTED SHIFTS CAUSED BY USER.
  14. LAYOUT INSTABILITY: OVERVIEW const observer new PerformanceObserver((list) for (const entry

    of list.getEntries()) { if (entry.hadRecentInput) continue; const source entry.sources?.[0]?.node; console.log("Shift:", entry.value, source); } }); observer.observe({ type: "layout-shift", buffered: true, > = = = }); {
  15. LAYOUT INSTABILITY: OVERVIEW const observer new PerformanceObserver((list) for (const entry

    of list.getEntries()) { if (entry.hadRecentInput) continue; const source entry.sources?.[0]?.node; console.log("Shift:", entry.value, source); } }); observer.observe({ type: "layout-shift", buffered: true, > = = = }); {
  16. LAYOUT INSTABILITY: OVERVIEW const observer new PerformanceObserver((list) for (const entry

    of list.getEntries()) { if (entry.hadRecentInput) continue; const source entry.sources?.[0]?.node; console.log("Shift:", entry.value, source); } }); observer.observe({ type: "layout-shift", buffered: true, > = = = }); {
  17. LAYOUT INSTABILITY: IDEAS ↝ DETECT INSTABILITY INTRODUCED BY THIRD-PARTY EMBEDS

    OR PERSONALIZATION. ↝ DETECT IMAGES OR IFRAMES LOADING WITHOUT A RESERVED SPACE. ↝ DETECT LAYOUT SHIFTS CAUSED BY WEB-FONT SWAPS.
  18. WEB PERFORMANCE APIS THAT YOU (PROBABLY) NEVER KNEW EXISTED REACT:

    INTERNALS AND ADVANCED PERFORMANCE PATTERNS/ USER TIMING
  19. USER TIMING: IDEAS ↝ MEASURE ROUTE TRANSITIONS IN AN SPA.

    ↝ MEASURE API LATENCY (REQUEST → RENDER). ↝ MEASURE THE TIME BETWEEN USER INTENT AND UI CONFIRMATION. ↝ MEASURE HYDRATION FOR ISLANDS/COMPONENTS. ↝ TRACK TIME SPENT INSIDE SUSPENSE FALLBACKS.
  20. WEB PERFORMANCE APIS THAT YOU (PROBABLY) NEVER KNEW EXISTED REACT:

    INTERNALS AND ADVANCED PERFORMANCE PATTERNS/ EVENT TIMING
  21. EVENT TIMING: OVERVIEW new PerformanceObserver(list { for (const entry of

    list.getEntries()) { console.log("Input delay:”, entry.processingStart - entry.startTime); console.log("Handler time:”, entry.processingEnd - entry.processingStart); console.log("Total latency:”, entry.duration); } > = }).observe({ type: "event", buffered: true });
  22. EVENT TIMING: IDEAS ↝ MEASURE DROPDOWN RESPONSIVENESS. ↝ MEASURE DRAG-AND-DROP

    LATENCY. ↝ DETECT SLOW SLIDER INTERACTIONS. ↝ DETECT INPUT LAG IN FORMS. ↝ TRACK RESPONSIVENESS REGRESSIONS AFTER RELEASES.
  23. RESOURCE TIMING: OVERVIEW new PerformanceObserver(list { for (const entry of

    list.getEntries()) { console.log(entry.name); console.log("TTFB:", entry.responseStart - entry.requestStart); console.log("Download:", entry.responseEnd - entry.responseStart); console.log("Cache Hit:" entry.transferSize === 0); } > = }).observe({ type: "resource", buffered: true });
  24. RESOURCE TIMING: IDEAS ↝ MEASURE THIRD-PARTY SCRIPTS COST. ↝ MEASURE

    API ENDPOINT LATENCY. ↝ DETECT SLOW FONT LOADING. ↝ DETECT CACHE MISSES VS CACHE HITS. ↝ DETECT CDN CONFIGURATION ISSUES.
  25. SERVER TIMING: IDEAS ↝ MEASURE DB LATENCY IN THE BROWSER.

    ↝ DETECT A SLOW AUTH MIDDLEWARE. ↝ DEBUG EDGE-CACHE EFFECTIVENESS. ↝ DETECT TEMPLATE RENDERING BOTTLENECKS.
  26. ELEMENT TIMING: OVERVIEW ↝ ALLOWS YOU TO MEASURE THE RENDER

    TIME OF SPECIFIC ELEMENTS. ↝ USEFUL FOR KNOWING WHEN THE LARGEST IMAGE OR TEXT BLOCK WAS PAINTED TO THE SCREEN. ↝ THE BASIS FOR THE LARGEST CONTENTFUL PAINT (LCP) METRIC.
  27. ELEMENT TIMING: OVERVIEW <img src="/hero.jpg" elementtiming="hero" /> <script> new PerformanceObserver(list

    const entry { list.getEntries()[0]; console.log("Hero render:", entry.startTime); }).observe({ type: "element", buffered: true }); > = = </script>
  28. ELEMENT TIMING: IDEAS ↝ MEASURE HERO IMAGE RENDER TIMING. ↝

    MEASURE ABOVE-THE-FOLD READINESS. ↝ TRACK MARKETING CTA VISIBILITY TIMING. ↝ MEASURE WHEN SKELETON LOADERS DISAPPEAR. ↝ REPLACE SYNTHETIC LCP TRACKING WITH PRODUCTSPECIFIC METRICS.
  29. LONG TASKS: OVERVIEW new PerformanceObserver((list) { for (const entry of

    list.getEntries()) { console.log("Blocked for:", entry.duration); entry.attribution?.forEach((source) { console.log("Source:", source.containerSrc); }); } > = > = }).observe({ type: "longtask", buffered: true });
  30. LONG TASKS: IDEAS DETECT: ↝ HYDRATION BLOCKING THE MAIN THREAD.

    ↝ LARGE BUNDLE EXECUTION PAUSES. ↝ THIRD-PARTY IFRAME BLOCKING INPUT. ↝ EXPENSIVE LAYOUT RECALCULATIONS.
  31. LONG ANIMATION FRAMES: OVERVIEW ↝ DETECT UPDATES THAT TAKE MORE

    THAN 50 MS. ↝ CAPTURE WORK ACROSS JAVASCRIPT + RENDERING, NOT JUST SCRIPT EXECUTION. ↝ ATTRIBUTE SLOW FRAMES TO THE SCRIPTS AND PHASES CONSUMING TIME. ↝ USEFUL FOR UNDERSTANDING JANK, RESPONSIVENESS ISSUES, AND INP REGRESSIONS.
  32. LONG ANIMATION FRAMES: OVERVIEW const observer new PerformanceObserver((list) { for

    (const entry of list.getEntries()) { console.log("Duration:", entry.duration); console.log("Blocking:", entry.blockingDuration); console.log("Scripts:", entry.scripts); } }); observer.observe({ type: "long-anim ation-frame", buffered: true, > = = });
  33. LONG ANIMATION FRAMES: OVERVIEW const observer new PerformanceObserver((list) { for

    (const entry of list.getEntries()) { console.log("Duration:", entry.duration); console.log("Blocking:", entry.blockingDuration); console.log("Scripts:", entry.scripts); } }); observer.observe({ type: "long-anim ation-frame", buffered: true, > = = });
  34. LONG ANIMATION FRAMES: OVERVIEW const observer new PerformanceObserver((list) { for

    (const entry of list.getEntries()) { console.log("Duration:", entry.duration); console.log("Blocking:", entry.blockingDuration); console.log("Scripts:", entry.scripts); } }); observer.observe({ type: "long-anim ation-frame", buffered: true, > = = });
  35. LONG ANIMATION FRAMES: IDEAS DETECT: ↝ INP REGRESSIONS. ↝ RENDERING

    PIPELINE BOTTLENECKS. ↝ ANIMATION FRAME DROPS. ↝ SLOW CSS/LAYOUT RECALCULATIONS. ↝ SCRIPTS FORCING EXPENSIVE STYLE/LAYOUT.
  36. SELF PROFILING: OVERVIEW ↝ RUNS A SAMPLING PROFILER ON REAL

    USERS' DEVICES. ↝ PERIODICALLY SNAPSHOTS THE CURRENT JAVASCRIPT CALL STACK. ↝ FINDS STATISTICALLY FREQUENT HOT PATHS WITHOUT INSTRUMENTING EVERY FUNCTION. ↝ LOWER OVERHEAD THAN TRACING EVERY FUNCTION ENTRY/EXIT.
  37. SELF PROFILING: OVERVIEW const profiler new Profiler({ sampleInterval: 10, maxBufferSize:

    10000 }); await doWork(); const profile await profiler.stop(); = = console.log(profile.samples);
  38. SELF PROFILING: IDEAS ↝ PROFILE THIRD-PARTY SCRIPT EXECUTION TIME. ↝

    DETECT HOT LOOPS IN DATA PROCESSING PIPELINES. ↝ PROFILE HYDRATION BOTTLENECKS. ↝ DETECT REGRESSIONS AFTER FEATURE ROLLOUT.
  39. MEMORY USAGE: OVERVIEW ↝ ESTIMATE HOW MUCH MEMORY YOUR PAGE

    IS USING IN THE BROWSER. ↝ BREAK USAGE DOWN ACROSS JAVASCRIPT, DOM, AND OTHER BROWSER-MANAGED RESOURCES. ↝ TRACK MEMORY GROWTH OVER TIME TO SPOT POTENTIAL LEAKS. ↝ USEFUL FOR LONG-LIVED APPS WHERE PERFORMANCE DEGRADES GRADUALLY.
  40. MEMORY USAGE: LEAKS #1 const obj { a: new Array(1000),

    b: new Array(2000) }; setInterval(() { console.log(obj.a); > = = }, 1000);
  41. MEMORY USAGE: LEAKS ↝ FORGETTING TO UNREGISTER AN EVENT LISTENER.

    ↝ ACCIDENTALLY CAPTURING OBJECTS FROM AN IFRAME. ↝ NOT CLOSING A WORKER. ↝ ACCUMULATING OBJECTS IN ARRAYS. ↝ AND MUCH MORE!
  42. NETWORK STATUS: OVERVIEW API INFORMATION { effectiveType: "4g", rtt: 200,

    const networkInfo navigator.connection.addEventListener('change', onConnectionChange); downlink: 1.65, saveData: false, = }
  43. NETWORK STATUS: IDEAS ↝ DISABLE ROUTE PREFETCHING ON SLOW CONNECTIONS.

    ↝ SKIP ANALYTICS UPLOADS WHEN RTT IS HIGH. ↝ LOAD LOWER-RESOLUTION ON CONSTRAINED BANDWIDTH. ↝ ADAPT TO SITUATIONS WHEN USERS ARE OFFLINE. ↝ RESPECT DATA SAVING AS A USER PERFORMANCE PREFERENCE SIGNAL.
  44. NETWORK STATUS: IDEAS switch (connectionType) { case "4g": return <Video

    src={videoSrc} />; case "3g": return <Image src={imageSrc.hiRes} alt={alt} />; default: return <Image src={imageSrc.lowRes} alt={alt} />; }
  45. BATTERY STATUS: OVERVIEW const batteryInfo await navigator.getBattery(); batteryInfo.addEventListener("chargingchange", listener); batteryInfo.addEventListener("chargingtimechange",

    listener); batteryInfo.addEventListener("dischargingtimechange", listener); = batteryInfo.addEventListener("levelchange", listener);
  46. BATTERY STATUS: IDEAS ↝ DISABLE BACKGROUND POLLING ON LOW BATTERY.

    ↝ REDUCE ANIMATION FREQUENCY. ↝ STOP PREFETCHING BUNDLES. ↝ PERSIST UNSAVED DATA BEFORE SHUTDOWN RISK. ↝ SWITCH TO A STATIC MAP RATHER THAN AN INTERACTIVE ONE.
  47. COMPUTE PRESSURE: OVERVIEW ↝ OBSERVE WHEN THE USER’S DEVICE IS

    UNDER SIGNIFICANT CPU PRESSURE. ↝ EXPOSES COARSE PRESSURE STATES INSTEAD OF RAW HARDWARE UTILIZATION. ↝ LETS APPS ADAPT WORKLOAD AND VISUAL QUALITY DYNAMICALLY. ↝ USEFUL FOR EXPENSIVE RENDERING, ANIMATIONS, WEBGL, AND BACKGROUND PROCESSING.
  48. COMPUTE PRESSURE: OVERVIEW const observer const record new PressureObserver((records) records.at(-1);

    if (record?.state === "critical") { reduceRenderingQuality(); } }); observer.observe("cpu", { sampleInterval: 2000, > = = = }); {
  49. COMPUTE PRESSURE: OVERVIEW const observer const record new PressureObserver((records) records.at(-1);

    if (record?.state === "critical") { reduceRenderingQuality(); } }); observer.observe("cpu", { sampleInterval: 2000, > = = = }); {
  50. COMPUTE PRESSURE: OVERVIEW const observer const record new PressureObserver((records) records.at(-1);

    if (record?.state === "critical") { reduceRenderingQuality(); } }); observer.observe("cpu", { sampleInterval: 2000, > = = = }); {
  51. COMPUTE PRESSURE: IDEAS ↝ LOWER CANVAS RESOLUTION DYNAMICALLY. ↝ PAUSE

    BACKGROUND DATA PROCESSING PIPELINES. ↝ SWITCH FROM REAL-TIME UPDATES TO BATCHED ONES. ↝ DROP FRAME RATE IN WEBGL SCENES. ↝ REDUCE ANIMATION QUALITY WHEN CPU PRESSURE RISES.
  52. IMPROVING WITH THE PLATFORM PREDICT WORK PRIORITIZE WORK PRECONNECT •

    SPECULATION RULES PRIORITY HINTS • NATIVE LAZY LOADING SCHEDULE WORK CONTINUITY WORK SCHEDULE TASKS • YIELDING PRESERVE NAVIGATION • SMOOTH NAVIGATION
  53. PRECONNECT: OVERVIEW ↝ IT ALLOWS THE BROWSER TO SET UP

    EARLY CONNECTIONS BEFORE THE REQUEST IS ACTUALLY SENT TO THE SERVER. THIS INCLUDES: ↝ TLS NEGOTIATIONS ↝ TCP HANDSHAKES ↝ REDUCES CONNECTION SETUP LATENCY.
  54. PRECONNECT: IDEAS 100MS 200MS 300MS 400MS 500MS 600MS 700MS HTML

    CSS FONT 1 FONT 2 FONTS START LOADING FONTS RENDERED
  55. PRECONNECT: IDEAS 100MS 200MS 300MS 400MS 500MS 600MS HTML CSS

    FONT 1 FONT 1 FONT 2 FONT 2 FONTS START LOADING FONTS RENDERED 700MS
  56. SPECULATION RULES: OVERVIEW ↝ A MODERN AND MORE EXPRESSIVE REPLACEMENT

    FOR OLDER PRERENDER TECHNIQUES. ↝ DESIGNED TO IMPROVE PERFORMANCE FOR FUTURE DOCUMENT NAVIGATIONS. ↝ PREFETCH/PRERENDER DOCUMENTS AHEAD OF CLICKS. ↝ TARGETS FUTURE DOCUMENT NAVIGATIONS, ESPECIALLY MPAS.
  57. SPECULATION RULES: OVERVIEW <script type="speculationrules"> { "prefetch": [ { "urls":

    ["/checkout"] } ], "prerender": [ { "where": { "href_matches": "/product/ " } } ] } * </script>
  58. SPECULATION RULES: IDEAS ↝ PREFETCH /DASHBOARD AFTER LOGIN SUCCESS. ↝

    PREFETCH /CHECKOUT AFTER CART INTERACTION. ↝ PREFETCH TOP RESULT LINKS IN THE VIEWPORT. ↝ PRERENDER LIKELY NEXT SETTINGS TAB.
  59. PRIORITY HINTS: OVERVIEW ↝ TELL THE BROWSER WHAT MATTERS FIRST.

    ↝ INFLUENCE DEFAULT FETCH HEURISTICS WHEN NEEDED. ↝ OPTIMIZE LCP RESOURCES EXPLICITLY.
  60. Increase the priority of the LCP image <img src="image.jpg" fetchpriority="high"

    /> Lower the priority of above-the-fold images <ul class="carousel"> <img src="img/carousel-1.jpg" fetchpriority="high" /> <img src="img/carousel-2.jpg" fetchpriority="low" /> <img src="img/carousel-3.jpg" fetchpriority="low" /> </ul> Reprioritize scripts <script src="async_but_important.js" async fetchpriority="high"></script> > - - > - - > - - - - - - - - ! ! <script src="blocking_but_unimportant.js" fetchpriority="low"></script> ! < < < PRIORITY HINTS: OVERVIEW
  61. Increase the priority of the LCP image <img src="image.jpg" fetchpriority="high"

    /> Lower the priority of above-the-fold images <ul class="carousel"> <img src="img/carousel-1.jpg" fetchpriority="high" /> <img src="img/carousel-2.jpg" fetchpriority="low" /> <img src="img/carousel-3.jpg" fetchpriority="low" /> </ul> Reprioritize scripts <script src="async_but_important.js" async fetchpriority="high"></script> > - - > - - > - - - - - - - - ! ! <script src="blocking_but_unimportant.js" fetchpriority="low"></script> ! < < < PRIORITY HINTS: OVERVIEW
  62. Important validation data const user await fetch("/user"); Less important content

    data = = / const relatedPosts / / / PRIORITY HINTS: OVERVIEW await fetch("/posts/suggested", { priority: "low" });
  63. Important validation data const user await fetch("/user"); Less important content

    data = = / const relatedPosts / / / PRIORITY HINTS: OVERVIEW await fetch("/posts/suggested", { priority: "low" });
  64. PRIORITY HINTS: IDEAS ↝ BOOST HERO IMAGE PRIORITY. ↝ DEPRIORITIZE

    RECOMMENDATION PANELS. ↝ DEPRIORITIZE BELOW-FOLD IMAGES.
  65. NATIVE LAZY LOADING: OVERVIEW WITH ZERO JAVASCRIPT, YOU CAN… ↝

    DEFER IMAGE AND IFRAME DOWNLOADS AUTOMATICALLY. ↝ LET THE BROWSER DECIDE OPTIMAL FETCH TIMING. ↝ REMOVE OFF-SCREEN CONTENT FROM THE CRITICAL RENDERING PATH.
  66. NATIVE LAZY LOADING: OVERVIEW <img src="/gallery-1.jpg" loading="lazy" width="800" height="600" />

    <iframe src="https://maps.example.com" loading="lazy" width="600" height="400"> </iframe>
  67. NATIVE LAZY LOADING: OVERVIEW <img src="/gallery-1.jpg" loading="lazy" width="800" height="600" />

    <iframe src="https://maps.example.com" loading="lazy" width="600" height="400"> </iframe>
  68. NATIVE LAZY LOADING: IDEAS ↝ PRODUCT GALLERY IMAGES. ↝ EMBEDDED

    PLAYERS, MAPS AND CHAT WIDGETS. ↝ DASHBOARDS BELOW THE FOLD.
  69. SCHEDULE WORK: CURRENT ISSUES ↝ NO PRIORITY CONTROL. ↝ NO

    CANCELLATION SEMANTICS. ↝ NO COORDINATION WITH THE BROWSER SCHEDULER. ↝ NO INPUT RESPONSIVENESS GUARANTEES. ↝ NO WAY TO BREAK LONG TASKS SAFELY.
  70. SCHEDULE TASKS: OVERVIEW ↝ SCHEDULE TASKS WITH EXPLICIT PRIORITY. ↝

    COORDINATE WITH THE BROWSER RENDERING PIPELINE. ↝ REPLACE setTimeout( , 0) HACKS. ↝ SUPPORTS CANCELLATION VIA SIGNALS. . . . ↝ WORKS IN WORKERS TOO.
  71. YIELDING: OVERVIEW ↝ SPLIT LONG TASKS SAFELY. ↝ RETURN CONTROL

    TO THE BROWSER MID-EXECUTION. ↝ AVOID BLOCKING INPUT AND RENDERING. ↝ REPLACE MANUAL CHUNKING LOOPS.
  72. PRESERVE NAVIGATION: OVERVIEW ↝ RESTORE PAGES INSTANTLY ON BACK/FORWARD NAVIGATION.

    ↝ KEEP DOM + JAVASCRIPT HEAP ALIVE IN MEMORY. ↝ ELIMINATE RELOAD ENTIRELY. ↝ TURN NAVIGATION INTO RESTORATION.
  73. PRESERVE NAVIGATION: MONITOR window.addEventListener('pageshow', (event) { if (event.persisted) { console.log('This

    page was restored from the bfcache.'); } else { console.log('This page was loaded normally.'); } > = });
  74. PRESERVE NAVIGATION: MONITOR window.addEventListener('pagehide', (event) { if (event.persisted) { console.log('This

    page might be entering the bfcache.'); } else { console.log('This page will unload normally and be discarded.'); } > = });
  75. PRESERVE NAVIGATION: MONITOR new PerformanceObserver(list { for (const entry of

    list.getEntries()) { console.log(entry.notRestoredReasons); } > = }).observe({ type: "navigation", buffered: true });
  76. SMOOTH NAVIGATION: OVERVIEW SAME-DOCUMENT • SPA document.startViewTransition(async () CROSS-DOCUMENT •

    MPA { @view-transition { await updateTheCurrentDocument(); navigation: auto; > } = });
  77. #win 🏆 No need to force an MPA to become

    an SPA just to get continuity.
  78. WEB PERFORMANCE APIS THAT YOU (PROBABLY) NEVER KNEW EXISTED #1

    Core Web Vitals are a better starting point than a nish line. fi — IN THE BLINK OF AN EYE • TIM KADLEC , 2024
  79. WEB PERFORMANCE APIS THAT YOU (PROBABLY) NEVER KNEW EXISTED Existing

    RUM tools are #3 great—until scale, cost, or product-speci c questions force you to measure things fi yourself.
  80. VENDORS CAN’T MEASURE YOUR “READY” TIME UNTIL THE… ↝ SCROLL

    EFFECTS WORK. ↝ APP RESPONDS TO CLICKS. ↝ MOST MEANINGFUL VIDEOS/ANIMATIONS RUN. ↝ PRIMARY FEATURE SHOWS UP/IS INTERACTIVE. ↝ COOKIE BANNER SHOWS UP.
  81. WEB PERFORMANCE APIS THAT YOU (PROBABLY) NEVER KNEW EXISTED AI

    agents can write JS. But only engineers who #4 understand scheduling, rendering, and other web fundamentals can decide what should be optimized.
  82. WEB PERFORMANCE APIS THAT YOU (PROBABLY) NEVER KNEW EXISTED Always

    try to correlate #6 behavior analysis with contextual metrics and business outcomes to tell the full story.
  83. WEB PERFORMANCE APIS THAT YOU (PROBABLY) NEVER KNEW EXISTED There's

    probably a business case for #7 making your app faster. But web performance is about more than “just” business.
  84. WEB PERFORMANCE APIS THAT YOU (PROBABLY) NEVER KNEW EXISTED THAT’S

    ALL, FOLKS! THANKS! 👋 🇺🇸 QUESTIONS? MATHEUS ALBUQUERQUE • @ythecombinator