-
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
new_audit: third party facades #11290
Conversation
You can accomplish this with
For the subitems, yes? +1
It's fine. The strings won't be retranslated. It's a noop to TC, and just a little noise in the PR. This could be made into an opportunity by extending the ByteEfficiencyAudit, and returning a I'm unclear on the usage of |
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.
quick comments
@connorjclark The current iteration lists individual resources which are used by a certain product, some products have more than one. Additionally, some facades can be made for multiple products, React Live Chat loader can be used with 4 different live chat clients for example. However, it is unlikely a page will ever use more than one live chat client and that is the only facade which applies to multiple products for now. Do you think listing products rather or individual resources for each facade would be better? If listing products is better then we can eliminate the subrows for now. |
Co-authored-by: Connor Clark <[email protected]>
… into lazy-third-party
Temporary "Learn more" link: https://web.dev/efficiently-load-third-party-javascript/?utm_source=lighthouse&utm_medium=cli |
Hm, @adamraine we might want to tweak how we surface the savings to avoid underreporting since the product request identification is only for the widget request itself and not everything it brings in. Any ideas for ways we can restructure to surface all the work of the entity once a product is detected? |
@patrickhulce How do you feel about incorporating any requests from the same entity which occur after the deferrable product request? Probably won't be able to use |
Sounds like a good start 👍 we can always tweak in the future as we observe its effects
Or could refactor it slightly to accept an optional filter? |
@patrickhulce I ran into a problem that may present itself later. If we have an entity with 2 facades for 2 different products, how can we determine which facade to list entity resources under if they do not belong to either product are fetched after the resources for both products? We don't currently have any entities to cause this conflict but it's difficult to ignore until it occurs. |
It certainly could happen @adamraine but here's why I'm not too worried about it. At least there the worst case failure mode is that we overstate the savings on each product as the cost of them both. Given that's it's likely they'd share some base anyway and it wouldn't really be possible to tease apart which is which, I'm not terribly concerned with this outcome compared to the outcome of Lighthouse telling a user to use this facade to save 0 KiB when the cost is ~400 KiB and a ton of script execution. (sidenote how is it possible that even a single intercom widget script is 0 KiB that seems like a bug?) WDYT? |
I see your point, this is probably the best direction to go for now. The only other alternative would be to eliminate the impact numbers entirely.
It looks like the transfer size is ~240 bytes which is 0.240 KiB which gets rounded down to 0 KiB. The |
@brendankenny @patrickhulce @connorjclark Thanks for all the comments! There were a lot of them so could ya'll take another look to make sure I properly addressed your concerns :). |
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.
still LGTM!
Co-authored-by: Patrick Hulce <[email protected]>
Audit to identify third party resources which can be lazy loaded with a facade alternative.
Doc
Latest design (as of nov 12 2020):
test page: https://www.smartling.com/
Notes on design:
Having the total transfer size / total blocking time in the same row as the facade alternative is confusing. The user may get the impression that those are the individual transfer size / blocking time for the facade not the total. It may be better to not display any totals in that row to avoid this problem.ResolvedIt is unclear what entity each link is a part of which could be useful information. I think we could add an extra column to hold the entity name or product name to clarify the purpose of each resource.ResolvedWhat is the "Show 3rd party resources" checkbox for. Is there a way to remove it?ResolvedOther notes:
This PR updates ThirdPartyWeb to 0.12.2deps: update third-party-web #11469ThePR mergedLazyThirdParty.getSummaries()
function has a lot of shared code with the changes in report(third-party-summary): show resources for entity #11219 (review). When that PR lands I should be able to useThirdPartySummary.getSummaries()
to eliminate some of the code duplication.MovingResolvedcolumnBlockingTime
fromThirdPartySummary.UIStrings
toi18n.UIStrings
forced changes to ~50 locale files. Is there a way to avoid this?