Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] Improve shouldPrefetch default value #953

Open
Mister-Hope opened this issue Jun 15, 2022 · 3 comments
Open

[Feature request] Improve shouldPrefetch default value #953

Mister-Hope opened this issue Jun 15, 2022 · 3 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@Mister-Hope
Copy link
Member

Clear and concise description of the problem

Currenly the shouldPrefetch: true default behavior have serious preformance impact on large sites with FCP time.

For a large site with around 1500 pages, shouldPrefetch link can take up to 30-50KB in each html entry.

Suggested solution

As @meteorlxy suggests earlier, we can change the default behavior to only prefetch assets which can be visited through the page.

Or more detailed:

  1. find all links in the page, (also home and 404)
  2. find all links in navbar and sidebar
  3. Combine them together with a link array
  4. Get all the preload links of them
  5. filter the duplicated ones
  6. Set them as default value of shouldPretch

But this requires improvments mentioned in #952

Alternative

No response

Additional context

No response

@github-actions github-actions bot added the stale label Jun 23, 2022
@github-actions
Copy link

This issue is marked as stale because it has not had recent activity. Issues marked with stale will be closed if they have no activity within 3 days.

@github-actions
Copy link

github-actions bot commented Jul 4, 2022

This issue is marked as stale because it has not had recent activity. Issues marked with stale will be closed if they have no activity within 3 days.

@github-actions
Copy link

This issue is marked as stale because it has not had recent activity. Issues marked with stale will be closed if they have no activity within 3 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants