נתוני ביצועים אמיתיים עבור Lighthouse

סיכום מבוסס בינה מלאכותית

The discussion revolves around improving Lighthouse performance measurements for Discourse by excluding the “Chrome-Lighthouse” user-agent to reflect real user experience. rrit proposes enabling Lighthouse to measure the application view as seen by actual users, contrasting it with the current crawler-view measurement. codinghorror expresses concern over Android performance disparities and insists that Lighthouse tests should be run on iPhone devices to be meaningful. rrit counters that Google already collects real-user experience data from Android devices via the CrUX dataset, which feeds into Core Web Vitals. Falco suggests using a custom user agent to simulate the desired view, while rrit clarifies that the mobile/desktop view can be toggled via URL parameters (?mobile_view=1 or ?mobile_view=0), with ?mobile_view=auto resetting the setting.

Can we exclude the user-agent “Chrome-Lighthouse” from crawlers and thereby show Lighthouse the real application view?

https://github.com/discourse/discourse/pull/15592

Application-view performance

This enables Lightouse in Chrome DevTools and PageSpeed Insights to measure the performance of Discourse like viewed by an user.

Crawler-view performance

Until now Lighthouse measured the performance for an user-device which is rendering the crawler-layout - this never happens in reality.

When they run those lighthose performance tests on a recent iPhone model (even an iPhone 8 or later), I am open to this. Right now android performance is 3x (or more) slower than iPhone unfortunately. :pensive_face:

Check your device at Speedometer 2.0 to see what I mean – this measures JavaScript performance in the browser:

Until they run lighthouse on an iPhone (any model) for context, I am absolutely opposed to any change here. When they do, I will happily accept the PR, with gusto.

For their metrics they are already collecting “real-user experience data” (CrUX dataset) from ~200 EUR/USD Android phones running Chrome - and this data gets into the Core Web Vitals report on Google Search Console.

How about putting this behind a flag or enable it for development environments only?

You can run lighthouse with a custom user agent from your machine to get the SPA perf numbers.

For this solution to measure the intended Discourse view:

  • mobile-view: add ?mobile_view=1 to the url
  • desktop-view: add ?mobile_view=0 to the url

This setting is remembered in LocalStorage. So reset it once if necessary:
Add ?mobile_view=auto to the url.