aboutsummaryrefslogtreecommitdiff
path: root/files/ja/web/performance/index.html
blob: 1c7d55d941781c52969c9fcb5e63725c01c08da2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
---
title: Web パフォーマンス
slug: Web/Performance
translation_of: Web/Performance
---
<div>{{draft}}</div>

<p><span class="seoSummary">Web パフォーマンスは客観的な測定値であり、ロード時間とランタイムに関するユーザーエクスペリエンスの認知度です。Web パフォーマンスとは、サイトがロードされ、対話型になり、応答性が向上するまでにかかる時間と、ユーザーとの対話中にコンテンツがどの程度スムーズになるかです </span>- スクロールはスムーズですか? ボタンはクリック可能ですか? ポップアップはすばやく開くことができますか? また、ポップアップはスムーズにアニメートしますか? Web パフォーマンスには、読み込み時間、1秒あたりのフレーム数、対話時間までの客観的な測定値と、コンテンツの読み込みに要した時間の主観的な経験の両方が含まれます。</p>

<p>サイトのレスポンスに時間がかかるほど、ユーザーはそのサイトを放棄します。ロードの時間とレスポンスの時間を最小限に抑え、エクスペリエンスをできるだけ早くインタラクティブにしながら、エクスペリエンスの長い末尾部分に非同期的にロードすることで、レイテンシを隠す追加機能を追加することが重要です。</p>

<p>Web パフォーマンスの測定と改善に役立つツール、API、およびベストプラクティスがあります。 このセクションでそれらをカバーします</p>

<h2 id="主なチュートリアル">主なチュートリアル</h2>

<p>The MDN <a href="/en-US/docs/Learn/Performance">Web Performance Learning Area</a> contains modern, up-to-date tutorials covering Performance essentials:</p>

<dl>
 <dt><a href="/en-US/docs/Learn/Performance/What_is_web_performance">What is web performance</a></dt>
 <dd>This article starts the module off with a good look at what Performance actually is — this includes the tools, metrics, APIs, networks, and groups of people we need to consider when thinking about performance, and how we can make Performance part of our web development workflow.</dd>
 <dt><a href="/en-US/docs/Web/Performance/Critical_rendering_path">Critical rendering path</a></dt>
 <dd>Some attributes and the source order of your markup can impact the performance or your website. By minimizing the number of DOM nodes, making sure you use the best order and attributes for included content such as styles, scripts, media, and third-party scripts, you can drastically improve the user experience. This article looks in detail at how HTML and the critical rendering path one can use to ensure maximum performance.</dd>
 <dt><a href="/en-US/docs/Learn/Performance/JavaScript">JavaScript performance best practices</a></dt>
 <dd>JavaScript, when used properly, can allow for interactive and immersive web experiences ... or it can significantly harm download time, render time, in app performance, battery life, and user experience. <span class="veryhardreadability"><span><span>This article outlines some JavaScript best practices that can ensure even complex content is as performant as possible.</span></span></span></dd>
 <dt><a href="/en-US/docs/Learn/Performance/Multimedia">Multimedia: Images and Video</a></dt>
 <dd>Frequently, media optimization is the lowest hanging fruit of web performance. Serving different media files based on each user agent's capability, size, and pixel density is possible. Additional tips, like removing audio tracks from background images, can improve performance even further. In this article, we discuss the impact video, audio, and image content has on performance, and the methods to ensure that impact is as minimal as possible.</dd>
 <dt><a href="/en-US/docs/Learn/Performance/CSS_performance">CSS performance features</a></dt>
 <dd>CSS may be a less important optimization focus for improved performance, but there are some CSS features that impact performance more than others. In this article, we look at some CSS properties that impact performance and suggested ways of handling styles to ensure performance is not negatively impacted.</dd>
 <dt><a href="/en-US/docs/Learn/Performance/perceived_performance">How do users perceive performance?</a></dt>
 <dd>
 <p>More important than how fast your website is in milliseconds, is how fast do your users perceive your site to be. Page load time, idling, responsiveness to user interaction, and the smoothness of scrolling and other animations impact these perceptions. In this article, we discuss the various loading metrics, animation, and responsiveness metrics, along with best practices to improve user perception, if not the actual timings.</p>
 </dd>
 <dt><a href="/en-US/docs/Learn/Performance/web_performance_basics">Web Performance Basics</a></dt>
 <dd>In addition to the front end components of HTML, CSS, JavaScript, and media files, there are features that can make applications slower and features that can make applications subjectively and objectively faster. There are many APIs, Developer Tools, best practices and bad practices relating to web performance. Here we'll introduce many of these features ad the basic level and provide links to deeper dives to improve performance for each topic.</dd>
 <dt><a href="/en-US/docs/Learn/Performance/Mobile">Mobile performance</a></dt>
 <dd>With web access on mobile devices being so popular, and all mobile platforms having fully-fledged web browsers, but possibly limited bandwidth, CPU and battery life, it is important to consider the performance of your web content on these platforms. This article looks at mobile-specific performance considerations.</dd>
 <dt>Populating the page</dt>
 <dd>The client makes an HTTP request, and, hopefully, a few seconds later, the site appears. Displaying the content involves executing JavaScript, possibly modifying the DOM, calculating styles, calculating layout, and finally rendering the content, which involves painting and compositing, and can involve GPU acceleration on a separate thread.</dd>
 <dt>Performance bottlenecks</dt>
 <dd> </dd>
 <dt><a href="/en-US/docs/Web/Performance/time_to_interactive">Time to Interactive</a></dt>
 <dd> </dd>
 <dt><a href="/en-US/docs/Learn/Performance/Latency">Understanding latency</a></dt>
 <dd>
 <p>Latency is the amount of time it takes between the browser making a request for a resource, and the browser receiving back the first byte of the resource requested. This article explains what latency is, how it impacts performance, and how to measure and improve latency.</p>
 </dd>
 <dt>Understanding bandwidth</dt>
 <dd>
 <div>
 <div class="public-DraftStyleDefault-block public-DraftStyleDefault-ltr"><span><span>Bandwidth is the amount of data (measured in Mbps or Kbps) that one can send per second. </span></span><span class="veryhardreadability"><span><span>This article explains the role of bandwidth in media-rich internet applications, how you can measure it, and how you can optimize applications to make the best use of available bandwidth</span></span></span><span><span>.</span></span></div>
 </div>

 <p> </p>
 </dd>
 <dt><a href="/en-US/docs/Learn/Performance/HTTP2">HTTP/2 and you</a></dt>
 <dd>
 <p>The transport layer—that is, HTTP—is utterly essential to the functioning of the web, and it has only been relatively recently that it has seen a major update in the form of HTTP/2. Out of the box, HTTP/2 provides many performance improvements and advantages over its predecessor, but it also changes the landscape. In this article, you'll learn what HTTP/2 does for you, and how to fine-tune your application to make it do go even further.</p>
 </dd>
 <dt>The role of TLS in performance</dt>
 <dd>
 <p>TLS—or HTTPS as we tend to call it—is crucial in creating secure and safe user experiences. While hardware has reduced the negative impacts TLS has had on server performance, it still represents a substantial slice of the time we spend waiting for browsers to connect to servers. This article explains the TLS handshake process, and offers some tips for reducing this time, such as OCSP stapling, HSTS preload headers, and the potential role of resource hints in masking TLS latency for third parties.</p>
 </dd>
 <dt>Reading performance charts</dt>
 <dd>Developer tools provide information on performance, memory, and network requests. Knowing how to read <a href="https://developer.mozilla.org/en-US/docs/Tools/Performance/Waterfall">waterfall</a> charts, <a href="https://developer.mozilla.org/en-US/docs/Tools/Performance/Call_Tree">call trees</a>, traces, <a href="https://developer.mozilla.org/en-US/docs/Tools/Performance/Flame_Chart">flame charts</a> , and <a href="https://developer.mozilla.org/en-US/docs/Tools/Performance/Allocations">allocations</a> in your browser developer tools will help you understand waterfall and flame charts in other performance tools.</dd>
 <dt>Analyzing JavaScript bundles</dt>
 <dd>No doubt, JavaScript is a big part of modern web development. While you should always strive to reduce the amount of JavaScript you use in your applications, it can be difficult to know where to start. <span class="veryhardreadability"><span><span>In this guide, we'll show you how to analyze your application's script bundles, so you know </span></span><em><span>what</span></em><span><span> you're using, as well how to detect if your app contains duplicated scripts between bundles</span></span></span><span><span>.</span></span></dd>
 <dt><a href="/en-US/docs/Web/Performance/Lazy_loading">Lazy loading</a></dt>
 <dd>It isn't always necessary to load all of a web applications assets on initial page load. Lazy Loading is defering the loading of assets on a page, such as scripts, images, etc., on a page to a later point in time – when those assets are actually needed.</dd>
 <dt>Lazy-loading JavaScript with import()</dt>
 <dd>The term "lazy loading" often refers to load deferment techniques for assets not needed at load such as loading below-the-fold imagery only when those images scroll into the view. Now there are native features to load JavaScript! In this guide, we'll talk about the dynamic import() statement, a newer browser feature, that loads a JavaScript module on demand.</dd>
 <dt><a href="/en-US/docs/Web/Performance/Controlling_resource_delivery_with_resource_hints">Controlling resource delivery with resource hints</a></dt>
 <dd>Browsers often know better than we do when it comes to resource prioritization and delivery—but they're far from clairyovant. Native browser features enable us to hint to the browser when it should connect to another server, or preload a resource before the browser knows it ever needs it. When used judiciously, this can make fast experience seem even faster. In this article, we cover native browser features like rel=preconnect, rel=dns-prefetch, rel=prefetch, and rel=preload, and how to use them to your advantage.</dd>
</dl>

<h2 class="Other_documentation" id="Other_documentation" name="Other_documentation">Other documentation</h2>

<dl>
 <dt><a href="/en-US/docs/Web/Performance/business_case_for_performance">The business case for web performance</a></dt>
 <dd>
 <p>You know web performance is important, but how do you convince clients and management to invest in performance and make it a priority. In this article, we'll discuss creating a clear business case to convince decision-makers to make the investment. </p>
 </dd>
 <dt><a href="/en-US/docs/Web/Performance/Performance_budget">Performance Budgets</a></dt>
 <dd>Marketing, design, and sales needs, and developer experience, often ad bloat, third-party scripts, and other features that can slow down web performance. To help set priorities, it is helpful to set a performance budget: a set of restrictions to not exceed during the development phase. In this article, we'll discuss creating and sticking to a performance budget. </dd>
 <dt><a href="/en-US/docs/Web/Performance/Mobile_performance_checklist">Mobile performance checklist</a></dt>
 <dd>A concise checklist of performance considerations impacting mobile network users on hand-held, battery operated devices.</dd>
 <dt><a href="/en-US/docs/Web/Apps/Fundamentals/Performance/Optimizing_startup_performance">Optimizing Startup Performance</a><a href="/en-US/docs/Web/Apps/Fundamentals/Performance/Optimizing_startup_performance"> </a></dt>
 <dd>How long does your app take to start up? Does it lock up the browser while loading? Take the time to ensure your app starts up nicely. This article offers tips and suggestions to help you achieve that goal.</dd>
 <dt><a href="/en-US/docs/Tools/Performance">Developer Tools Performance Features</a></dt>
 <dd>This section provides information on how to use and understand the performance features in your developer tools, including <a href="/en-US/docs/Tools/Performance/Waterfall">Waterfall</a>, <a href="/en-US/docs/Tools/Performance/Call_Tree">Call Tree</a>, and <a href="/en-US/docs/Tools/Performance/Flame_Chart">Flame Charts</a>.</dd>
 <dt><a href="/en-US/docs/Learn/Performance/Understanding_latency">Understanding Latency</a></dt>
 <dd>Latency is the amount of time it takes between the browser making a request for a resource, and the browser receiving back the first byte of the resource requested. This article explains what latency is, how it impacts performance, how to measure latency, and how to reduce it.</dd>
 <dt><a href="/en-US/docs/Web/Performance/Checklist">Web performance checklist</a></dt>
 <dd>A performance checklist of features to consider when developing applications with links to tutorials on how to implement each features, include service workers, diagnosing performance problems, font loading best practices, client hints, creating performant animations, etc.</dd>
 <dt><a href="https://developer.mozilla.org/en-US/docs/Web/Performance/Rum-vs-Synthetic">Performance Monitoring: RUM vs synthetic monitoring</a></dt>
 <dd>Sythentic and RUM are two different approaches for monitoring web performance. In this article we define and compare these two performance monitoring approaches.</dd>
</dl>

<h3 id="App_Performance">App Performance</h3>

<dl>
 <dt><a href="/en-US/Apps/Developing/Performance/Performance_fundamentals">Performance fundamentals</a></dt>
 <dd>A wide overview of Web application performance, what it is, how the browser helps to improve it, and what tools and processes you can use to test and further improve it.</dd>
 <dt><a href="/en-US/Apps/Developing/Performance/Optimizing_startup_performance">Optimizing startup performance</a></dt>
 <dd>Tips and suggestions to help you improve startup performance, both when writing a new app and when porting an app from another platform to the Web.</dd>
 <dt><a href="/en-US/docs/Performance/Profiling_with_the_Built-in_Profiler">Profiling with the built-in profiler</a></dt>
 <dd>Learn how to profile app performance with Firefox's built-in profiler.</dd>
 <dt><a href="/en-US/Apps/Build/Performance/CSS_JavaScript_animation_performance">CSS and JavaScript animation performance</a></dt>
 <dd>Animations are critical for a pleasurable user experience. This article discusses the performance differences between CSS- and JavaScript-based animations. </dd>
</dl>


<p>{{LandingPageListSubpages}}</p>

<h2 id="See_also">See also</h2>

<p>HTML</p>

<ul>
 <li><a href="/en-US/docs/Web/HTML/Element/picture">The <code>&lt;picture&gt;</code> Element</a></li>
 <li><a href="/en-US/docs/Web/HTML/Element/video">The <code>&lt;video&gt;</code> Element</a></li>
 <li><a href="/en-US/docs/Web/HTML/Element/source">The <code>&lt;source&gt;</code> Element</a></li>
 <li><a href="/en-US/docs/Web/HTML/Element/img#Attributes">The <code>&lt;img&gt; srcset</code> attribute</a>
  <ul>
   <li><a href="/en-US/docs/Learn/HTML/Multimedia_and_embedding/Responsive_images">Responsive images</a></li>
  </ul>
 </li>
 <li><a href="/en-US/docs/Web/HTML/Preloading_content">Preloading content with <code>rel="preload"</code></a> - <a href="https://w3c.github.io/preload/">(https://w3c.github.io/preload/ </a>)</li>
</ul>

<p>CSS</p>

<ul>
 <li><a href="/en-US/docs/Web/CSS/will-change">will-change</a></li>
 <li>GPU v CPU</li>
 <li>Measuring layout</li>
 <li>font-loading best practices</li>
</ul>

<p>JavaScript</p>

<ul>
 <li><a href="/en-US/docs/Web/Events/DOMContentLoaded">DOMContentLoaded</a></li>
 <li><a href="/en-US/docs/Glossary/Garbage_collection">Garbage collection</a></li>
 <li><a href="/en-US/docs/Web/API/window/requestAnimationFrame">requestAnimationFrame</a></li>
</ul>

<p>APIs</p>

<ul>
 <li><a href="/en-US/docs/Web/API/Performance_API">Performance API</a></li>
 <li><a href="/en-US/docs/Web/API/Navigation_timing_API">Navigation Timing API</a></li>
 <li><a href="/en-US/docs/Web/API/Media_Capabilities_API/Using_the_Media_Capabilities_API">Media Capabilities API</a></li>
 <li><a href="/en-US/docs/Web/API/Network_Information_API">Network Information API</a></li>
 <li><a href="/en-US/docs/Web/API/PerformanceNavigationTiming">PerformanceNavigationTiming</a></li>
 <li><a href="/en-US/docs/Web/API/Battery_Status_API">Battery Status API</a></li>
 <li><a href="/en-US/docs/Web/API/Navigator/deviceMemory">Navigator.deviceMemory</a></li>
 <li><a href="/en-US/docs/Web/API/Intersection_Observer_API">Intersection Observer</a></li>
 <li><a href="/en-US/docs/Web/API/User_Timing_API/Using_the_User_Timing_API">Using the User Timing AP</a>I</li>
 <li><a href="/en-US/docs/Web/API/Long_Tasks_API">Long Tasks API</a></li>
 <li><a href="/en-US/docs/Web/API/DOMHighResTimeStamp">High Resolution Timing API</a> (<a href="https://w3c.github.io/hr-time/">https://w3c.github.io/hr-time/)</a></li>
 <li><a href="/en-US/docs/Web/API/Resource_Timing_API/Using_the_Resource_Timing_API">Resource Timing API</a></li>
 <li><a href="/en-US/docs/Web/API/Page_Visibility_API">Page Visibility</a></li>
 <li><a href="/en-US/docs/Web/API/Background_Tasks_API">Cooperative Scheduling of Background Tasks API</a>
  <ul>
   <li style="margin-top: 0.25em;"><a href="/en-US/docs/Web/API/Window/requestIdleCallback">requestIdleCallback() </a></li>
  </ul>
 </li>
 <li><a href="/en-US/docs/Web/API/Beacon_API/Using_the_Beacon_API">Beacon API</a></li>
 <li>Resource Hints - <a href="/en-US/docs/Web/HTTP/Headers/X-DNS-Prefetch-Control">dns-prefetch</a>, preconnect, <a href="/en-US/docs/Web/HTTP/Link_prefetching_FAQ">prefetch</a>, and prerender</li>
 <li><a href="/en-US/docs/Web/API/FetchEvent/navigationPreload">Fetchevent.navigationPreload</a></li>
 <li><a href="/en-US/docs/Web/API/PerformanceServerTiming">Performance Server Timing API</a></li>
</ul>

<p>Headers</p>

<ul>
 <li><a href="/en-US/docs/Web/HTTP/Headers/Content-Encoding">Content-encoding</a></li>
 <li>HTTP/2</li>
 <li><a href="/en-US/docs/Glossary/GZip_compression">gZip</a></li>
 <li>Client Hints</li>
</ul>

<p>Tools</p>

<ul>
 <li><a href="/en-US/docs/Tools/Performance">Performance in Firefox Developer Tools</a></li>
 <li>Flame charts</li>
 <li>the Network panel</li>
 <li>waterfall charts</li>
</ul>

<p>Additional Metrics</p>

<ul>
 <li>Speed Index and Perceptual Speed Index</li>
</ul>

<p>Best Practices</p>

<ul>
 <li><a href="/en-US/docs/Web/API/Service_Worker_API/Using_Service_Workers">Using Service Workers</a></li>
 <li><a href="/en-US/docs/Web/API/Web_Workers_API/Using_web_workers">Using Web Workers</a>
  <ul>
   <li><a href="/en-US/docs/Web/API/Web_Workers_API">Web Workers API</a></li>
  </ul>
 </li>
 <li><a href="/en-US/docs/Web/Apps/Progressive/Offline_Service_workers">PWA</a></li>
 <li><a href="/en-US/docs/Web/HTTP/Caching">Caching</a></li>
 <li>Content Delivery Networks (CDN)</li>
</ul>