GoogleChrome / GoogleChrome/lighthouse

handling impact of isInputPending on long tasks metrics?

Open
#11,747 5 comments 0 reactions 0 assignees View on GitHub
good first issue metrics-cwv P2
Dominant language
JavaScript
Stars
30.8k
Forks
9.8k
Avg merge
1d 14h
Merged PRs (30d)
20

Description

[`navigator.scheduling.isInputPending`](https://wicg.github.io/is-input-pending/) is shipping by default in current Chrome stable (m87). Without user input, any page using `isInputPending` has a strong reason to believe yielding during long tasks won't improve user experience so it could keep on chugging instead.

This may have a large impact on any metric looking at long tasks (TBT, TTI) compared to what a real user would experience when loading the same page.

- There was a discussion in the WICG about how it should interact with the Long Tasks API and warnings against long tasks, as well if there should be a way to tell if `isInputPending` was called during a particular long task: https://github.com/WICG/is-input-pending/issues/37
- [Chrome status entry](https://chromestatus.com/feature/5719830432841728)

Contributor guide

Open the contributing guide

Research direction

Start by reading the linked WICG is-input-pending issue and the Chrome status entry to understand the proposed interaction with the Long Tasks API. Then trace how Lighthouse reports TBT and TTI and determine what treatment is appropriate for pages using navigator.scheduling.isInputPending. Done means an agreed, documented handling for these metrics, backed by any necessary tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
performance
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.