Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[renderblocking] Trigger font preload timer early from preload scanner
This patch fixes a first paint performance regression. We allow font preloading to shortly block rendering, and unblocks when a 50ms timer fires. Before crrev.com/c/3527422, the timer is started when preload scanner finds a font resource to preload; After the patch, the timer is started when a font preload link element is actually inserted into the document. When there are parser-blocking resources (e.g., scripts) before the preload link, then there can be a significant delay between preload scanner finds the resource and parser inserts the element into the document, which means the timer is started much later than before, and therefore, much later to fire, after crrev.com/c/3527422. This patch fixes it by letting preload scanner start the timer when a font resource preload is started. The fix has been verified by https://pinpoint-dot-chromeperf.appspot.com/job/15de535c4a0000 Fixed: 1308083 Change-Id: I9ef664aecc3bd7c2da213a21008593ed4c5e0ef8 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3543384 Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org> Auto-Submit: Xiaocheng Hu <xiaochengh@chromium.org> Reviewed-by: Joey Arhar <jarhar@chromium.org> Commit-Queue: Joey Arhar <jarhar@chromium.org> Cr-Commit-Position: refs/heads/main@{#984119}
- Loading branch information
1 parent
65e69b9
commit 3a125bd
Showing
4 changed files
with
58 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters