MDnsAPI::OnDnsSdEvent taking bulk of extension startup time. |
|||||
Issue descriptionAs per UMA sampling profiler https://uma.googleplex.com/p/chrome/callstacks/?sid=e52155b0fe1ea6c46bdcbdc4c82c7c5b, MDnsAPI::OnDnsSdEvent is taking a bulk of extension startup time. It causes a new renderer to be created, which seems wrong. ExtensionService::Init takes around 135 ms on startup with MDnsAPI::OnDnsSdEvent taking about 15.4 ms. This is on Windows 64-bit 63.0.3236.0 Canary.
,
Oct 20 2017
When I search the uma data on that page I don't see any mention of OnDnsSdEvent. I can see it when I do a regex search for it but then I lose all context. It may be that I'm just not used to the UI. > It causes a new renderer to be created, which seems wrong. Extensions typically run in their own rendered so this is normal and expected, if I understand correctly. Is this a regression or an observation about where the cost is coming from.
,
Oct 20 2017
>>When I search the uma data on that page I don't see any mention of OnDnsSdEvent. I can see it when I do a regex search for it but then I lose all context. It may be that I'm just not used to the UI. Just search for extensions. Then here are some functions you can follow ProfileManager::AddProfile -> ExtensionService::Init -> InstalledLoader::LoadAllExtensions -> ExtensionRegistrar::EnableExtension -> MdnsAPI::... >>Extensions typically run in their own rendered so this is normal and expected, if I understand correctly. This is happening during startup, which seemed weird to me. >>Is this a regression or an observation about where the cost is coming from. This was just an observation on glancing through Extension initialization data on the metrics page. It seemed wrong that a simple API was taking a long time during startup.
,
Oct 20 2017
This is basically WAI. The UMA link doesn't tell me much, but The Media Router component event page registers an event listener for DNS-SD service discovery of Cast devices. When there's a change in state, it wakes up the event page which creates a renderer process. Fortunately we are about to move Cast device discovery out of the event page and this will no longer occur. See Bug 752604 to track this launch.
,
Oct 20 2017
>> When there's a change in state, it wakes up the event page which creates a renderer process. Just confirming, is this WAI for it to happen during Profile initialization/ExtensionService::Init?
,
Oct 20 2017
I don't know why initializing the ExtensionService would cause a mDNS event handler to fire. It may be an artifact of the mDNS API: it uses event filters defined in the app manifest; loading the manifest changes the registration of service types with the DNS-SD implementation; which in turn may trigger an event somewhere since the set of service types has changed. That seems like a bug. Regardless, we are going to remove our dependency on this API shortly.
,
Oct 20 2017
Oh ok. Will add Bug 752604 as a blocker. Also, you can probably track and expect improvements to Extensions.ExtensionServiceInitTime, for the finch experiment.
,
Oct 25 2017
,
Mar 2 2018
We've removed extension use of mDNS in M64. I looked at some of the metrics referenced in this bug as a followup. Extensions.ExtensionServiceInitTime is slightly decreased from M63 to M64. https://uma.googleplex.com/p/chrome/timeline_v2/?sid=e35d1b2b44fb900625928bdee7d12e08 I don't see any tasks related to extension service initialization in the sampling profiler for M66 dev channel. https://uma.googleplex.com/p/chrome/callstacks/?sid=27d2e74323837f8f88eba2bddda3b7b5 If there are other tasks slowing down extension startup, they shouldn't be related to mDNS use in the Media Router extension. I'll move myself to CC in case there are any followups I can help with.
,
Mar 2 2018
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by karandeepb@chromium.org
, Oct 20 2017Status: Assigned (was: Untriaged)