WordPress / performance

Performance plugin from the WordPress Performance Group, which is a collection of standalone performance modules.
https://wordpress.org/plugins/performance-lab/
GNU General Public License v2.0
350 stars 94 forks source link

Speculative Loading Measurement Approach #1426

Open dainemawer opened 1 month ago

dainemawer commented 1 month ago

I installed the Speculative Rules plugin, and it is working great. This may be outside of the realm of discussion, so I apologise if it's not applicable.

Three points:

  1. If you have the site open in two tabs, the pre-rendering fails - I know this is an edge case, but I just wanted to know why.
  2. It would be helpful to mention in the docs somewhere that you can debug/keep track of renders in Chrome DevTools -> Application -> Background services -> Speculative loads
  3. What is the best way to measure improvement in Core Web Vitals? A Lighthouse Report and a WebPageTest will not trigger the user intent. My first thought is to use Lighthouse Timespan mode. But wondered if there was any further thinking around this.
adamsilverstein commented 1 month ago

Hey @dainemawer - thanks for the ticket!

  1. interesting! I'm not sure of the reason there, I can ask around
  2. Good point, I think we discussed this on the issue before this landed, but having it in the docs would be helpful.
  3. I have started working on some overall reporting for the impact of the feature overall using field data and am also thinking about this. So far, I'm planning to track:
    • Adoption of the feature
    • Impact to CWV metrics (primarily thinking LCP and CLS) for WordPress sites using the feature. Here I plan to compare the metrics of sites before and after they install the plugin

To check impact on a single site, I would ideally focus on metrics for secondary page loads (where the API should be activated) and also at metrics like pages/visitor or return visitors.

tunetheweb commented 1 month ago

@dainemawer could you give more info on point 1? I just tried opening https://speculative-rules.glitch.me/ in two tabs and both speculated correctly. Background tabs do drop speculations after 3 mins to save on memory so many that's what you're hitting? We also increased that recently to 10 mins following some feedback.

On the second point, I think it would be good to link to the two Chrome docs on this (but I'm bias as I wrote them):

And finally on the third point, the best way to measure this is in the field, ideally using a RUM solution. You should also be able to see the differences in the Chrome User Experience Report (CrUX), which ultimates feeds through to Google Search Console's Core Web Vitals screen, if your site is popular enough to appear in that. However, it doesn't allow you to compare prerendered and non-prerendered pages. We did however add navigation types to that earlier this year, and that's easily viewable in the CrUX Dashboard for each month, so you should be able to see an increase in prerendered page views, and that should correlate with a decrease in LCP times.

tunetheweb commented 1 month ago

Actually I've just been made away of some circumstances where tabs are duplicated that can prevent prerendering. I've raised this bug to track this: https://issues.chromium.org/issues/356852180

Is this what you were seeing?