GoogleChrome / GoogleChrome/lighthouse

Reduce bandwidth usage when running bfcache check

Open
#16,318 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request P2
Dominant language
JavaScript
Stars
30.8k
Forks
9.8k
Avg merge
1d 14h
Merged PRs (30d)
20

Description

We've been looking at reducing our bandwidth costs when running Lighthouse recently. If I understand correctly, running Lighthouse currently opens the tested page 1 or 2 times:

  1. For the main navigation
  2. For the bfcache check, if the page can't be served from the bf cache

Is it possible to block e.g. image requests for the bf cache navigation? And maybe also others like JavaScript? Since the point is just to check if the page can be served from the bfcache. Doing that would also reduce CPU load.

Not sure if there are any reasons to load the page in full. Like bfcache checks for iframes maybe?

I can submit a PR for this if there's interest.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at core/gather/gatherers/bf-cache-failures.js around the linked navigation logic and trace how the bfcache check loads the page. Determine which image, JavaScript, or other requests can be blocked without affecting the check, including iframe behavior; done means the check remains valid while reducing unnecessary bandwidth and CPU use.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
performance, web-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.