jetpack icon indicating copy to clipboard operation
jetpack copied to clipboard

Boost: Add speculation rules

Open haqadn opened this issue 1 year ago • 2 comments

Proposed changes:

[!NOTE]
This is something core is experimenting with and will likely add to core soon. There is also a Speculative Loading plugin from core performance team as part of the experiment. This implementation is similar, but it tries to be more conservative by excluding external URLs, and URLs with query parameter to avoid pitfalls.

Other information:

  • [ ] Have you written new tests for your changes, if applicable?
  • [ ] Have you checked the E2E test CI results, and verified that your changes do not break them?
  • [ ] Have you tested your changes on WordPress.com, if applicable (if so, you'll see a generated comment below with a script to run)?

Jetpack product discussion

Does this pull request change what data or activity we track or use?

Testing instructions:

  • define JETPACK_BOOST_ALPHA_FEATURES as true

  • If you are using uBlock origin, uncheck "Disable pre-fetching (to prevent any connection for blocked network requests)" image

  • Enable "Prerender Pages" from Boost settings

  • Go to the front end of the site.

  • Hover over any internal URL that and give it a moment before clicking.

  • The page should load almost instantly because it's speculatively loading in the background.

haqadn avatar May 27 '24 14:05 haqadn

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • :white_check_mark: Include a description of your PR changes.
  • :white_check_mark: Add a "[Status]" label (In Progress, Needs Team Review, ...).
  • :red_circle: Add a "[Type]" label (Bug, Enhancement, Janitorial, Task).
  • :white_check_mark: Add testing instructions.
  • :white_check_mark: Specify whether this PR includes any changes to data or privacy.
  • :white_check_mark: Add changelog entries to affected projects

This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation :robot:


The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available.


Follow this PR Review Process:

  1. Ensure all required checks appearing at the bottom of this PR are passing.
  2. Choose a review path based on your changes:
    • A. Team Review: add the "[Status] Needs Team Review" label
      • For most changes, including minor cross-team impacts.
      • Example: Updating a team-specific component or a small change to a shared library.
    • B. Crew Review: add the "[Status] Needs Review" label
      • For significant changes to core functionality.
      • Example: Major updates to a shared library or complex features.
    • C. Both: Start with Team, then request Crew
      • For complex changes or when you need extra confidence.
      • Example: Refactor affecting multiple systems.
  3. Get at least one approval before merging.

Still unsure? Reach out in #jetpack-developers for guidance!


Boost plugin:

  • Next scheduled release: March 3, 2025.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.

github-actions[bot] avatar May 27 '24 14:05 github-actions[bot]

This PR has been marked as stale. This happened because:

  • It has been inactive for the past 3 months.
  • It hasn’t been labeled `[Pri] BLOCKER`, `[Pri] High`, etc.

If this PR is still useful, please do a [trunk merge or rebase](https://github.com/Automattic/jetpack/blob/trunk/docs/git-workflow.md#keeping-your-branch-up-to-date) and otherwise make sure it's up to date and has clear testing instructions. You may also want to ping possible reviewers in case they've forgotten about it. Please close this PR if you think it's not valid anymore — if you do, please add a brief explanation.

If the PR is not updated (or at least commented on) in another month, it will be automatically closed.

github-actions[bot] avatar Aug 26 '24 00:08 github-actions[bot]

This PR has been automatically closed as it has not been updated in some time. If you want to resume work on the PR, feel free to restore the branch and reopen the PR.

github-actions[bot] avatar Sep 26 '24 00:09 github-actions[bot]

Code Coverage Summary

1 file is newly checked for coverage.

File Coverage
projects/plugins/boost/app/modules/optimizations/speculative-loading/Speculative_Loading.php 0/33 (0.00%) 💔

Full summary · PHP report · JS report

Add label https://github.com/Automattic/jetpack/labels/I%20don%27t%20care%20about%20code%20coverage%20for%20this%20PR to override the failing coverage check.

jp-launch-control[bot] avatar Feb 24 '25 11:02 jp-launch-control[bot]

Too many failed checks. I already did a merge but it asking for another. I'll just go back to my newer PR.

donnchawp avatar Feb 24 '25 11:02 donnchawp