Movatterモバイル変換


[0]ホーム

URL:


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

The Cost Of JavaScript in 2023

Avatar for Addy Osmani Addy Osmani
June 28, 2023

The Cost Of JavaScript in 2023

As the world builds sites that are more heavily reliant on JavaScript, we sometimes pay for what we send down in ways that we can’t always easily see. Addy Osmani will explain how and why JavaScript is the most expensive resource your site uses today—especially on mobile and lower-end desktops.

Addy will also share tips for fixing JavaScript performance issues so everything loads quicker. A little discipline can help if you want your site to load and be interactive as soon as possible on mobile.

Video:https://www.youtube.com/watch?v=ZKH3DLT4BKw

Objective
Teach developers why JavaScript is the costliest part of their sites and what they can do to optimize this well.

Five Things Audience Members Will Learn:

What the dominant costs of heavy JavaScript are
How median hardware plus heavy JavaScript can impact user-experience
Tips and tricks for reducing the cost of JavaScript, reducing long-tasks and improving the Core Web Vitals metrics
Things frameworks and browsers are doing to try reducing the cost of JavaScript by default.
How new performance metrics can help you reason about where to optimize JavaScript to improve user interactions

First presented at FITC/Web Unleashed

Avatar for Addy Osmani

Addy Osmani

June 28, 2023
Tweet

More Decks by Addy Osmani

See All by Addy Osmani

Other Decks in Programming

See All in Programming

Featured

See All Featured

Transcript

  1. None
  2. @reactive_dude JAVASCRIPT IS GOOD...IN MODERATION

  3. None
  4. None
  5. None
  6. Patterns for web applications Portfolio Content Storefront Social Network Immersive

    Holotype Personal Blog CNN Amazon Facebook Figma Interactivity Minimal Linked Articles Purchase Multi-Point, Real-time Everything Session Depth Shallow Shallow Shallow - Medium Extended Deep Values Simplicity Discover-ability Load Performance Dynamicism Immersiveness Routing Server Server, Hybrid Hybrid, Transitional Transitional, Client Client Rendering Static Static, SSR Static, SSR SSR CSR Hydration None Progressive, Partial Partial, Resumable Any None (CSR) Example Framework 11ty Astro, Elder Marko, Qwik, Hydrogen Next, Remix Create React App https://dev.to/this-is-learning/patterns-for-building-javascript-websites-in-2022-5a93
  7. None
  8. None
  9. None
  10. PROGRESSIVE HYDRATION

  11. FACTOR IN VISIBILITY

  12. None
  13. None
  14. None
  15. None
  16. None
  17. None
  18. None
  19. None
  20. None
  21. None
  22. @addyosmani

  23. None
  24. None
  25. None
  26. None
  27. None
  28. None
  29. None
  30. None
  31. None
  32. None
  33. INP

  34. None
  35. None
  36. None
  37. https://web.dev/optimize-long-tasks/ A) B)

  38. https://philipwalton.com/articles/why-web-developers-need-to-care-about-interactivity/ *

  39. None
  40. None
  41. None
  42. None
  43. * Background compilation: 1-2% improvement to main thread V8 time

    time reduction. Background parsing and other improvements to parse reduced overall V8 load time by up to 10-20%
  44. ~20-40% reduction in parse and compilation time during load.

  45. None
  46. None
  47. None
  48. None
  49. None
  50. None
  51. None
  52. None
  53. None
  54. None
  55. None
  56. None
  57. None
  58. None
  59. None
  60. None
  61. None
  62. @ChrisArter npm install WHAT’S IN YOUR JAVASCRIPT BUNDLE?

  63. None
  64. None
  65. None
  66. Static import

  67. Static import

  68. Code-splitting bundles

  69. None
  70. Dynamic Import

  71. Dynamic Import

  72. Code-splitting bundles

  73. Route and component splitting

  74. None
  75. “Invisible” Visible

  76. Import On Visibility

  77. Import On Visibility

  78. None
  79. How and where do I want to render content? Check

    out Lydia Hallie’s great “Rendering Patterns” talk
  80. None
  81. Rehydration

  82. Partial Hydration

  83. Islands Architecture

  84. None
  85. Rehydration

  86. Progressive Hydration

  87. RESUMABLE HYDRATION Check out “Hydration is pure overhead” by Misko

    Hevery
  88. None
  89. https://twitter.com/shuding_

  90. None
  91. Streaming Server Rendering

  92. Doodles courtesy Dan Abramov

  93. Selective Hydration: before

  94. Selective Hydration: after

  95. None
  96. None
  97. None
  98. None
  99. None
  100. None
  101. None

[8]ページ先頭

©2009-2025 Movatter.jp