⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 263271 in webkit


Ignore:
Timestamp:
Jun 19, 2020, 9:30:08 AM (6 years ago)
Author:
Chris Dumez
Message:

Web Inspector: RemoteInspector::singleton() slows down MobileSafari launch
https://bugs.webkit.org/show_bug.cgi?id=213381
<rdar://problem/64533003>

Reviewed by Darin Adler.

RemoteInspector::singleton() is expensive according to traces. It was called in WebProcessPool::initializeNewWebProcess()
which happens on MobileSafari launch because we prewarm a WebProcess. However, there is no reason to initialize remote
Web Inspector at this point. Per associated comment, Remote Web Inspector needs to be initialized once there is a
sub process hosting one of our Web View. As a result, I moved the initialization call to WebPageProxy::initializeWebPage()
which is when we actually send the IPC to the WebProcess to create the WebPage that is backing the UI-side WebView.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::initializeWebPage):

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::initializeNewWebProcess):

Location:
trunk/Source/WebKit
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r263270 r263271  
     12020-06-19  Chris Dumez  <cdumez@apple.com>
     2
     3        Web Inspector: RemoteInspector::singleton() slows down MobileSafari launch
     4        https://bugs.webkit.org/show_bug.cgi?id=213381
     5        <rdar://problem/64533003>
     6
     7        Reviewed by Darin Adler.
     8
     9        RemoteInspector::singleton() is expensive according to traces. It was called in WebProcessPool::initializeNewWebProcess()
     10        which happens on MobileSafari launch because we prewarm a WebProcess. However, there is no reason to initialize remote
     11        Web Inspector at this point. Per associated comment, Remote Web Inspector needs to be initialized once there is a
     12        sub process hosting one of our Web View. As a result, I moved the initialization call to WebPageProxy::initializeWebPage()
     13        which is when we actually send the IPC to the WebProcess to create the WebPage that is backing the UI-side WebView.
     14
     15        * UIProcess/WebPageProxy.cpp:
     16        (WebKit::WebPageProxy::initializeWebPage):
     17        * UIProcess/WebProcessPool.cpp:
     18        (WebKit::WebProcessPool::initializeNewWebProcess):
     19
    1202020-06-19  Chris Dumez  <cdumez@apple.com>
    221
  • trunk/Source/WebKit/UIProcess/WebPageProxy.cpp

    r263057 r263271  
    10601060    ASSERT(m_drawingArea);
    10611061
     1062#if ENABLE(REMOTE_INSPECTOR)
     1063    // Initialize remote inspector connection now that we have a sub-process that is hosting one of our web views.
     1064    Inspector::RemoteInspector::singleton();
     1065#endif
     1066
    10621067    send(Messages::WebProcess::CreateWebPage(m_webPageID, creationParameters(m_process, *m_drawingArea)), 0);
    10631068
  • trunk/Source/WebKit/UIProcess/WebProcessPool.cpp

    r263094 r263271  
    11161116#endif
    11171117
    1118 #if ENABLE(REMOTE_INSPECTOR)
    1119     // Initialize remote inspector connection now that we have a sub-process that is hosting one of our web views.
    1120     Inspector::RemoteInspector::singleton();
    1121 #endif
    1122 
    11231118#if PLATFORM(MAC)
    11241119    registerDisplayConfigurationCallback();
Note: See TracChangeset for help on using the changeset viewer.