GNOME Bugzilla – Bug 706210
Plugin process scans plugins each time a new tab is opened
Last modified: 2014-04-08 11:01:57 UTC
I noticed ephy was freezing for a pretty long tme when starting a session with many tabs already open. Later, I noticed that during the freeze, many times I'd see the plugin process scanning, once an again, the same plugins. Then I opened a new tab and ephy froze for a little bit. A buch of child processes are forked out of ephy. So I presume that what is happening here is that, on restoring a session with N tabs, we are scanning the M existing plugins N times. Given that the scanning API (as far as I remember) is synchronous, we lock for N*M calls to the plugin process. We really need to fix this before 3.10. Not the synchronous nature of the scan, but the fact that each new tab causes ephy webkit to scan the plugins.
The stacktrace is not very helpful in finding out why this happens:
+ Trace 232390
Okay, I think might happen when the plugin scan fails. In that case, every time information about plugins is needed, the web process asks for it again and again. The seemingly offending method: void WebPlatformStrategies::populatePluginCache() { if (m_pluginCacheIsPopulated) return; ASSERT(m_cachedPlugins.isEmpty()); // FIXME: Should we do something in case of error here? if (!WebProcess::shared().parentProcessConnection()->sendSync(Messages::WebProcessProxy::GetPlugins(m_shouldRefreshPlugins), Messages::WebProcessProxy::GetPlugins::Reply(m_cachedPlugins, m_cachedApplicationPlugins), 0)) return; m_shouldRefreshPlugins = false; m_pluginCacheIsPopulated = true; } In that case this is a WK bug.
WebKit now uses a plugin cache, so this is not a problem anymore