Changeset 249953 in webkit
- Timestamp:
- Sep 17, 2019 4:05:00 AM (5 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r249952 r249953 1 2019-09-17 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 [GTK] Initial view loading is slow 4 https://bugs.webkit.org/show_bug.cgi?id=201451 5 6 Reviewed by Sergio Villar Senin. 7 8 The problem is that now we are always calling DrawingAreaProxy::waitForBackingStoreUpdateOnNextPaint() after a 9 new process is launched and we used to do that only when launching a new process after a crash. This makes 10 m_hasReceivedFirstUpdate useless, because it's always set to true right after a process is launched. Then, we 11 wait up to half a second (which is usually the case for the initial load) until the first update. We only want 12 to do that when recovering from a crash or when swapping processes to avoid flashing effect. 13 14 * UIProcess/WebPageProxy.cpp: 15 (WebKit::WebPageProxy::launchProcess): Add ProcessLaunchReason parameter and pass it to 16 finishAttachingToWebProcess instead of IsProcessSwap. 17 (WebKit::WebPageProxy::swapToWebProcess): Pass ProcessLaunchReason::ProcessSwap to 18 finishAttachingToWebProcess(). 19 (WebKit::WebPageProxy::finishAttachingToWebProcess): Do not call 20 DrawingAreaProxy::waitForBackingStoreUpdateOnNextPaint() when process launch reason is ProcessLaunchReason::InitialProcess. 21 (WebKit::WebPageProxy::launchProcessForReload): Pass ProcessLaunchReason::Reload to launchProcess(). 22 * UIProcess/WebPageProxy.h: Remove IsProcessSwap and add ProcessLaunchReason instead that is passed to 23 launchProcess and finishAttachingToWebProcess. 24 1 25 2019-09-17 Carlos Garcia Campos <cgarcia@igalia.com> 2 26 -
trunk/Source/WebKit/UIProcess/WebPageProxy.cpp
r249942 r249953 723 723 } 724 724 725 void WebPageProxy::launchProcess(const RegistrableDomain& registrableDomain )725 void WebPageProxy::launchProcess(const RegistrableDomain& registrableDomain, ProcessLaunchReason reason) 726 726 { 727 727 ASSERT(!m_isClosed); … … 745 745 m_process->addMessageReceiver(Messages::WebPageProxy::messageReceiverName(), m_webPageID, *this); 746 746 747 finishAttachingToWebProcess( IsProcessSwap::No);747 finishAttachingToWebProcess(reason); 748 748 } 749 749 … … 819 819 m_process->addMessageReceiver(Messages::WebPageProxy::messageReceiverName(), m_webPageID, *this); 820 820 821 finishAttachingToWebProcess( IsProcessSwap::Yes);822 } 823 824 void WebPageProxy::finishAttachingToWebProcess( IsProcessSwap isProcessSwap)821 finishAttachingToWebProcess(ProcessLaunchReason::ProcessSwap); 822 } 823 824 void WebPageProxy::finishAttachingToWebProcess(ProcessLaunchReason reason) 825 825 { 826 826 ASSERT(m_process->state() != AuxiliaryProcessProxy::State::Terminated); … … 832 832 833 833 // In the process-swap case, the ProvisionalPageProxy already took care of initializing the WebPage in the WebProcess. 834 if ( isProcessSwap != IsProcessSwap::Yes)834 if (reason != ProcessLaunchReason::ProcessSwap) 835 835 initializeWebPage(); 836 836 … … 846 846 pageClient().didRelaunchProcess(); 847 847 m_pageLoadState.didSwapWebProcesses(); 848 m_drawingArea->waitForBackingStoreUpdateOnNextPaint(); 848 if (reason != ProcessLaunchReason::InitialProcess) 849 m_drawingArea->waitForBackingStoreUpdateOnNextPaint(); 849 850 } 850 851 … … 896 897 ASSERT(!hasRunningProcess()); 897 898 auto registrableDomain = m_backForwardList->currentItem() ? RegistrableDomain { URL(URL(), m_backForwardList->currentItem()->url()) } : RegistrableDomain { }; 898 launchProcess(registrableDomain );899 launchProcess(registrableDomain, ProcessLaunchReason::Crash); 899 900 900 901 if (!m_backForwardList->currentItem()) { … … 928 929 929 930 ASSERT(!hasRunningProcess()); 930 launchProcess(RegistrableDomain { URL(URL(), item.url()) } );931 launchProcess(RegistrableDomain { URL(URL(), item.url()) }, ProcessLaunchReason::InitialProcess); 931 932 932 933 if (&item != m_backForwardList->currentItem()) … … 1129 1130 { 1130 1131 if (!hasRunningProcess()) 1131 launchProcess({ } );1132 launchProcess({ }, ProcessLaunchReason::InitialProcess); 1132 1133 1133 1134 return m_process; … … 1142 1143 1143 1144 if (!hasRunningProcess()) 1144 launchProcess(RegistrableDomain { request.url() } );1145 launchProcess(RegistrableDomain { request.url() }, ProcessLaunchReason::InitialProcess); 1145 1146 1146 1147 auto navigation = m_navigationState->createLoadRequestNavigation(ResourceRequest(request), m_backForwardList->currentItem()); … … 1205 1206 1206 1207 if (!hasRunningProcess()) 1207 launchProcess({ } );1208 launchProcess({ }, ProcessLaunchReason::InitialProcess); 1208 1209 1209 1210 URL fileURL = URL(URL(), fileURLString); … … 1268 1269 1269 1270 if (!hasRunningProcess()) 1270 launchProcess({ } );1271 launchProcess({ }, ProcessLaunchReason::InitialProcess); 1271 1272 1272 1273 auto navigation = m_navigationState->createLoadDataNavigation(makeUnique<API::SubstituteData>(data.vector(), MIMEType, encoding, baseURL, userData)); … … 1318 1319 1319 1320 if (!hasRunningProcess()) 1320 launchProcess(RegistrableDomain { baseURL } );1321 launchProcess(RegistrableDomain { baseURL }, ProcessLaunchReason::InitialProcess); 1321 1322 1322 1323 auto transaction = m_pageLoadState.transaction(); … … 1355 1356 1356 1357 if (!hasRunningProcess()) 1357 launchProcess({ } );1358 launchProcess({ }, ProcessLaunchReason::InitialProcess); 1358 1359 1359 1360 auto transaction = m_pageLoadState.transaction(); … … 1385 1386 1386 1387 if (!hasRunningProcess()) 1387 launchProcess(RegistrableDomain { URL(URL(), urlString) } );1388 launchProcess(RegistrableDomain { URL(URL(), urlString) }, ProcessLaunchReason::InitialProcess); 1388 1389 1389 1390 m_process->send(Messages::WebPage::NavigateToPDFLinkWithSimulatedClick(urlString, documentPoint, screenPoint), m_webPageID); … … 3689 3690 { 3690 3691 if (&process() == process().processPool().dummyProcessProxy()) 3691 launchProcess({ } );3692 launchProcess({ }, ProcessLaunchReason::InitialProcess); 3692 3693 } 3693 3694 -
trunk/Source/WebKit/UIProcess/WebPageProxy.h
r249891 r249953 1748 1748 void setCanShortCircuitHorizontalWheelEvents(bool canShortCircuitHorizontalWheelEvents) { m_canShortCircuitHorizontalWheelEvents = canShortCircuitHorizontalWheelEvents; } 1749 1749 1750 void launchProcess(const WebCore::RegistrableDomain&); 1750 enum class ProcessLaunchReason { 1751 InitialProcess, 1752 ProcessSwap, 1753 Crash 1754 }; 1755 1756 void launchProcess(const WebCore::RegistrableDomain&, ProcessLaunchReason); 1751 1757 void swapToWebProcess(Ref<WebProcessProxy>&&, WebCore::PageIdentifier, std::unique_ptr<DrawingAreaProxy>&&, RefPtr<WebFrameProxy>&& mainFrame); 1752 1758 void didFailToSuspendAfterProcessSwap(); 1753 1759 void didSuspendAfterProcessSwap(); 1754 1755 enum class IsProcessSwap { No, Yes }; 1756 void finishAttachingToWebProcess(IsProcessSwap); 1760 void finishAttachingToWebProcess(ProcessLaunchReason); 1757 1761 1758 1762 RefPtr<API::Navigation> launchProcessForReload();
Note: See TracChangeset
for help on using the changeset viewer.