-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
core(driver): waitForFCP when tracing #6944
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the refactor ideas. _waitForFullyLoaded
has gotten pretty terrible to read or add to :)
@@ -874,23 +918,25 @@ class Driver { | |||
* possible workaround. | |||
* Resolves on the url of the loaded page, taking into account any redirects. | |||
* @param {string} url | |||
* @param {{waitForLoad?: boolean, waitForNavigated?: boolean, passContext?: LH.Gatherer.PassContext}} options | |||
* @param {{waitForFCP?: boolean, waitForLoad?: boolean, waitForNavigated?: boolean, passContext?: LH.Gatherer.PassContext}} options |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this pulled out as another option for performance reasons, or does fcp not fire in certain passes and we need the option so we don't always wait for the full timeout? It's unfortunate mental overhead since none of the wait*
options are independent. Is there a way we can reorganize?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correcto. On the passes without javascript and offline this can take unnecessarily long when we don't really care about FCP in those passes. In fact, every page that fails the without javascript
audit would take 45s+ because all we're doing is checking for the existence of text.
It's unfortunate mental overhead since none of the wait* options are independent. Is there a way we can reorganize?
Agreed. There are really only 4 scenarios despite the 3 total booleans. We could switch to an enum? Opposed to doing it in followup?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are really only 4 scenarios despite the 3 total booleans. We could switch to an enum? Opposed to doing it in followup?
No, that sounds good. Maybe pair it with a switch to "Potential Easy Alternative" (should mostly match what behavior today) or "Real TTI Conditions" (if we're feeling really brave)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Should we do a DZL?
Fo sho DZL, do a barrel roll! |
DZL is done! Go check it out http://lh-dzl-6944.surge.sh |
ha, well, I don't know how to interpret the DZL. Two sites slowed significantly in gather time, but the others didn't :) I think that's not unexpected? One other thing (possibly the cause for the above): for LH runs that end up with the |
This is my eternal struggle to get around with DZL for the past month. The comparison hash in that URL was for several days off so the sites were just different |
Yes indeed if the page truly never paints content then we will wait until our timeout instead load/network quiet.
Interesting, just from a capacity point of view? What would the alternative be? |
Yeah. I think they were having a bunch of NO_FCP at some point, so the timeout rate might significantly increase in the logs? I have no idea if it would matter, though. |
@exterkamp says it doesn't matter and he'll be happy if he can watch the graphs change a bit :) @paulirish just concurred. Ready for merge? |
baller ⛹️♀️ |
Summary
We don't actually wait for an FCP, and it seems like we should. There could be a lot more to this story of making our
waitForFullyLoaded
match TTI conditions as close as possible, but this is a good start.Fully Loaded Conditions After This PR
Potential Easy Alternative
Real TTI Conditions
Related Issues/PRs
closes #6941