Yahoo! JAPAN web services. ࣗࣾͱϕϯνϚʔΫαʔϏεͰύϑΥʔϚϯεείΞΛൺֱ͠ߴͰ͋ΔαʔϏεͷׂ߹ 38% 62% Yahoo! JAPAN Other 17% 83% Yahoo! JAPAN Other ※ Compare CWV performance scores from specific environments on the mobile web
measurements are taken in a specific network environment. Suitable for detailed analysis in a test environment. May miss problems that actual users have. Field Data Measured in the user environment used in the actual application. Know what score the actual user will experience. Not suitable for detailed analysis.
specific network environment. Suitable for detailed analysis in a test environment. May miss problems that actual users have. Field Data Measured in the user environment used in the actual application. Know what score the actual user will experience. Not suitable for detailed analysis. Chrome UX Report Dashboard (CrUX) Analysis of Trends and Results (monthly) Lighthouse CI + Custom Dashboard Detailed Analysis (daily) Differences in performance data ύϑΥʔϚϯεσʔλͷҧ͍
app specialized for fixed-point observation of Core Web Vitals score aggregation. It is self-hosted and developers can see the results of all services.
230 endpoints by lighthouse-ci cron jobs. We have a setup that simulates a slow environment and also sends metrics that are averaged multiple times. // collect page metrics lhci collect —url="[PAGE_URL]" --additive --settings.preset=desktop --settings.chromeFlags="-- no-sandbox --disable-gpu --disable-dev-shm-usage" // send metrics to ci server lhci upload --token="[TOKEN]" —serverBaseUrl="[SERVER_URL]"
A LHCI Data B ETL of MySQL data acquired by Lighthouse-ci provides a dashboard that overlays scores from Yahoo! JAPAN and Benchmark services on a weekly basis.
the Core Web Vitals score. Core Web Vitalsͷج४Ͱɺ”ྑ”ͷείΞ͕ҡ࣋Ͱ͖͍ͯΔ͜ͱɻ 1. Benchmark selection of other companies' services of the same type and maintain a superior score to them. ಉछͷଞࣾαʔϏεΛϕϯνϚʔΫʢൺֱରʣͱͯ͠ɺ༏ҐͳείΞͰ͋Δ͜ͱɻ 2.
VITALS LOW COST LOW EFFECTIVE FOR CORE WEB VITALS HIGHLY IMPLEMENTATION COST ࣮ίετ͕ߴ͍ վળޮՌ͕ߴ͍ վળޮՌ͕͍ ࣮ίετ͕͍ Low COST & High Effective. Priority points of improvement proposed for all services.
of loading resources by importance - 2. Compressed Delivery (gzip / brotoli) - 3. Reduce layout shifts, especially in the first view - 4. Delayed loading of scripts that monopolize the main thread - 5. Lazy loading image and iframe ॏཁͰϦιʔεͷಡΈࠐΈॱΛมߋ ѹॖ৴͢Δ ಛʹॳظը໘ͷϨΠΞτγϑτΛΒ͢ ϝΠϯεϨουΛઐ༗͢ΔεΫϦϓτΛूத ͯ͠ԆಡΈࠐΈ͢Δ ը૾ͱiframeͷԆಡΈࠐΈΛ͢Δ
Group will then analyze the bottlenecks in the service. We will analyze the service at the source code level and suggest prioritized performance improvements. ιʔείʔυ͔ΒվળࢪࡦΛఏҊ͢Δ 2. Analysis 3. Proposed improvements by priority 1. Selection of important pages 1. ॏཁͳϖʔδͷબఆ 2. ύϑΥʔϚϯεੳ 3. ༏ઌผʹվળࡦΛఏҊ
loading of modules below first view. ॳظը໘ͷϞδϡʔϧͷԆಡΈࠐΈ - Delayed loading of scripts for analysis. ੳʹؔ࿈͢ΔεΫϦϓτͷԆಡΈࠐΈ - Remove unnecessary bundles of lodash. lodashͷόϯυϧαΠζͷݮ - Enable tree shaking of configuration file (convert from json5 format to js format) ઃఆϑΝΠϧʹTreeShakingΛ༗ޮԽ
IMPLEMENTATION Immediately ͙͢ʹ࣮ߦ Critical processes that are not related to the DOM and can be executed independently. <script async src="****"> Sequential execution after loading DOM υΩϡϝϯτΛಡΈࠐΈޙɺॱ࣮࣍ߦ Main processing of applications, etc. <script defer src="****"> Execute in free time after the page is operational ϖʔδ͕ૢ࡞Մೳʹͳͬͨޙɺ ۭ͖࣌ؒʹಡΈࠐΜͰ࣮ߦ Analytics, ad retargeting, tag managers, etc. after “DOMContentLoaded” with RequestIdleCallback Execute in free time after the entire page has finished loading ϖʔδશମΛಡΈࠐΜͩޙɺ ۭ͖࣌ؒʹಡΈࠐΜͰ࣮ߦ Sub-elements unrelated to content, such as social networking widgets. after window “loaded” with RequestIdleCallback
not apply delayed loading to LCP images, and also load them first with PriorityHints and meta tag preload. ॳظը໘ͷॏཁը૾ʹԆಡΈࠐΈΛద༻ͤ ͣɺઌಡΈ͢Δ - Use “srcset” attributes to deliver the optimal image size for each device. σόΠεผʹը૾αΠζΛ࠷దԽ͢Δ - The initialization process of the carousel is not done first. (I often see bad implementations) ΧϧʔηϧͷॲཧͰը૾͕දࣔ͞Εͳ͍͜ͱͷ ରࡦ
Cache-Control header Ωϟογϡίϯτϩʔϧϔομͷ࠷దԽ - 2. Do not use document.write document.writeΛ༻͠ͳ͍ - 3. Reduced layout shift of Advertisement ࠂͷϨΠΞτγϑτݮ - 4. Reduced layout shift of Common header ڞ௨ϔομʔͷϨΠΞτγϑτݮ
a hash value, set maximum cache time // ϑΝΠϧʹϋογϡؚ͕·Ε͍ͯͨΒɺ࠷େ·ͰΩϟογϡ࣌ؒΛ৳͢͜ͱ͕Ͱ͖Δ Cache-Control: public, max-age=31536000, immutable // Set stale-while-revalidate cache with max-age (for Chrome/Edge/Firefox currently) // ͦ͠͏Ͱͳ͚ΕɺSWRͷΩϟογϡετϥςδΛ༻ͯ͠ɺ࠷৽ͷίϯςϯπΛ࣌ؒΩϟογϡ͢Δ Cache-Control: public, max-age=1, stale-while-revalidate=60 The short cache time that was set as the default value has been changed and adjusted to be the longest possible.
size AD - If there is a high likelihood that ads will be displayed, keep the minimum height using min-height and min-width. - Be prepared to display filler images when ads are not displayed. The specifications do not tell us which ads will be shown… min-height reduced layout shift
Change the default height with the highest probability of being displayed. insert a frame if there is a campaign delete a frame if there is a campaign Ωϟϯϖʔϯ͕͋ΕΛදࣔ Ωϟϯϖʔϯ͕ͳ͚ΕΛআ
2. Creating an environment that enables performance improvement without conscious effort ҙࣝͤͣͱύϑΥʔϚϯε্Ͱ͖Δ։ൃڥΛඋ͢Δ - 1. Improved technical baseline for web performance ύϑΥʔϚϯεٕज़ʹର͢ΔϕʔεϥΠϯͷ্
2. Creating an environment that enables performance improvement without conscious effort ҙࣝͤͣͱύϑΥʔϚϯε্Ͱ͖Δ։ൃڥΛඋ͢Δ How can we create a culture of self-improvement? ࣗൃతʹվળ͢ΔจԽΛ࡞ΔʹͲ͏ͨ͠Β͍͍ͩΖ͏ʁ
- Planning to add CWV integration capabilities to Yahoo! JAPAN’s common analysis tools. Yahoo! JAPANͷڞ௨ੳπʔϧʹCWV࿈ܞػೳΛՃ༧ఆ Automatically link to business metrics Ϗδωεࢦඪͱͷඥ͚Λࣗಈతʹߦ͏
about 15% of all requests. BFCacheͷ༗ޮԽ ࣮શମͷϦΫΤετͷ15%ఔϒϥβͷ ΔਐΉʹΑΔϦΫΤετ - Removed "unload" event: code fixes including 3rd party vendors. ͜Ε·Ͱͷϩά༷Λݟ͠ɺBFCache͕༗ޮʹ ͳΔΑ͏3rdύʔςΟϕϯμʔΛؚΊͨमਖ਼Λ࣮ࢪ தɻ