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

Add full-framerate render blocking attribute #11070

Open
gjc13 opened this issue Feb 25, 2025 · 1 comment
Open

Add full-framerate render blocking attribute #11070

gjc13 opened this issue Feb 25, 2025 · 1 comment
Labels
addition/proposal New features or enhancements needs implementer interest Moving the issue forward requires implementers to express interest

Comments

@gjc13
Copy link

gjc13 commented Feb 25, 2025

What problem are you trying to solve?

We would like to explore the possibility of improving the loading performance by adaptively lowering the frame rate during loading.

What solutions exist today?

The render blocking mechanism may be adopted to throttle the rendering. By adding a <link rel="expect" blocking="render"> element, the webpage can stop rendering until certain critical elements are fully parsed. However this will cause the page to be fully stalled and delay the user interaction. Thus we plan to add new experimental APIs to instruct the renderer to work at a lower priority.
The new API will be experimental. We plan to first adopt it on certain sites with origin trial and collect data about how lowering the frame rate affects the loading performance and user experience.

How would you solve it?

We propose to add a new render blocking token full-framerate to the blocking attributes. When the renderer is blocked with the full-framerate token, the renderer will work at a lower frame rate so as to reserve more resources for loading.
An example use case of the proposed API will be:
The web page contains an element <link rel="expect" href="#critical-content" blocking="full-framerate"/> in the page head. After parsing this element, the renderer will work at an implementation-specific lower frame rate.
After the #critical-content element is parsed, the renderer will restore its frame rate.
It is worth noting that the frame rate instructions will be informative. The browser may decide to lower the frame rate before parsing a blocking element. For instance, the frame rate may be lowered at the very beginning of the loading phase. On the other hand, the browser may also decide to restore the frame rate before the frame rate blocking element list gets empty. For instance, the frame rate may be restored after a timeout or certain user interactions.
An alternative approach is to introduce window.enableMaxPossibleFrameRate() and window.maybeLowerFrameRate() js API. The js API is more natural to express the fact that the frame rate instructions are non-mandatory. However we may still prefer the first approach because it reuses the current render blocking mechanism.

Anything else?

No response

@gjc13 gjc13 added addition/proposal New features or enhancements needs implementer interest Moving the issue forward requires implementers to express interest labels Feb 25, 2025
aarongable pushed a commit to chromium/chromium that referenced this issue Mar 6, 2025
The CL adds support for <link rel="expect" blocking="full-frame-rate"/>
elements. Such link elements can be used to lower the frame rate during
the loading stage for better loading performance. The feature is added
under the feature flag RenderBlockingFullFrameRate.

The proposed change to the HTML standard can be found at:
whatwg/html#11070

The ChromeStatus page for the feature can be found at:
https://chromestatus.com/feature/5207202081800192

Bug: 397832388
Change-Id: Ia8037416dc7666247806b0cee7ae8b17b8e7bbd3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6304399
Reviewed-by: Joey Arhar <[email protected]>
Reviewed-by: Vladimir Levin <[email protected]>
Commit-Queue: Jiacheng Guo <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1428726}
@Ravish990
Copy link

Hello @gjc13 I am Ravish. I want to work on the feature . I am interested in it . Currently I am learning about it .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addition/proposal New features or enhancements needs implementer interest Moving the issue forward requires implementers to express interest
Development

No branches or pull requests

2 participants