Skip to content
New issue

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

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

Already on GitHub? # to your account

handling impact of isInputPending on long tasks metrics? #11747

Open
brendankenny opened this issue Dec 2, 2020 · 3 comments
Open

handling impact of isInputPending on long tasks metrics? #11747

brendankenny opened this issue Dec 2, 2020 · 3 comments

Comments

@brendankenny
Copy link
Member

navigator.scheduling.isInputPending 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.

@patrickhulce
Copy link
Collaborator

There was some good discussion about this at TPAC too. My primary concern with checking if it was called is that we need to be sure how often it's called. I imagine we'll need to do some sort of shimming like we do with rIC.

@brendankenny
Copy link
Member Author

the last comment in that thread (WICG/is-input-pending#37 (comment)) brings up the gameability problem with it, too. Calling isInputPending would essentially bless a long task as fine even if the page had no intention of acting responsibly regardless of the isInputPending result.

@paulirish
Copy link
Member

paulirish commented Jan 11, 2021

We think an approach like "flip on isInputPending in certain circumstances" could make sense and be more fair to pages using this. Possibilities, always flip on (during a task) at 5000ms since navigation. or flip on after XXms in a long task.

Next step:

  • find out how to control the value of isInputPending()
  • find a working/production app/page using this
  • explore what diff emulation approaches make sense. perhaps talk to framework-side contact to determine what a fair/deterministic
  • test impact on long-task metrics like TBT and TTI

mostly chillin for now.

we're happy to hear from people familiar with isInputPending() use in frameworks, etc. "good first issue" if this is you.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

5 participants
@paulirish @brendankenny @patrickhulce @devtools-bot and others