-
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(bootup-time): better attribution #7059
Conversation
Could you talk about why this is currently not enabled for LH? Were there performance concerns? Next v8 release will do that by default. They claim zero-cost, so perhaps performance issues have been resolved? |
There were performance boogeyman concerns from enabling the debugger category. I never found statistically significant changes though.
This is awesome news!!! Enables more accurate lantern estimates, better attribution, huzzah!!!! :D 🎉 🎉 🎉 🎉 |
In order to satisfy #7005 (and to generally improve Example scenario: jQuery(document).ready(function(){
myapp.initalize();
});
Basically anytime the flame chart has a different color at the top vs the bottom, our current method leads to inaccurate results. We have avoided turning on the JS sampling profiler 'till now, but I think that's the correct move here. Here's Nic's test page with JS sampling off.. see that all bottomup time is associated to the start of the JS stack. And again but with JS sampling on. Correct selftime association now: |
Hm, I'm not sure we're on the same page with that example @paulirish. If in the |
I'm definitely not against enabling the sampling profiler though if we can use DZL to prove it's OK :D better fidelity is better fidelity and I won't fight that! |
Okay slightly diff example:
I'd expect to see jquery.js get 50ms and myapp to get 50ms. Right? |
Ah, I see what you're saying now. Yeah, we don't split tasks at all right now. It's a bit messy to try to half do self-time though, don't you think? In
I want myapp to get full blame for all of this work. From #7005 these were my thoughts: Two Main Options I see:
|
Basically, I'm saying it's really difficult to understand that a library installed it's own handler while it was being initialized and then is also letting other scripts piggyback on the same exact handler. Instead of registering new ones once it's invoked. As a result, I'd rather sacrifice this case to still be able to attribute to the other instigators. |
@paulirish we settled on this being a good step forward, right? LGTY? |
yes |
Summary
There are a couple things going on here all sparked by #7005. This bootup time audit is somewhat inconsistent because it's pulling double duty as two different things.
These are different because a script can force a layout. It's not fair to say the layout time was "script execution" necessarily because it was the browser doing the work, but it's also not fair to ignore the cost of layouts from third party scripts when saying "these are your problem scripts". Any ideas to solve this problem are welcome :)
Now on to the PR changes...
Future things to address:
frame
data andscriptId
could help here.Related Issues/PRs
#7005