Title: [265774] trunk/Source/WebKit
- Revision
- 265774
- Author
- [email protected]
- Date
- 2020-08-17 14:54:42 -0700 (Mon, 17 Aug 2020)
Log Message
[Cocoa] Avoid waiting for Launch Services on every load
https://bugs.webkit.org/show_bug.cgi?id=215569
Reviewed by Darin Adler.
Currently, we are waiting for the Launch Services database to be present on every load in the WebContent process.
It should be sufficient to wait only on the first load. Since we now are waiting only once per WebContent process,
increase the maximum wait time from 1s to 5s.
No new tests, covered by existing tests.
* WebProcess/WebPage/Cocoa/WebPageCocoa.mm:
(WebKit::WebPage::platformDidReceiveLoadParameters):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (265773 => 265774)
--- trunk/Source/WebKit/ChangeLog 2020-08-17 21:35:36 UTC (rev 265773)
+++ trunk/Source/WebKit/ChangeLog 2020-08-17 21:54:42 UTC (rev 265774)
@@ -1,3 +1,19 @@
+2020-08-17 Per Arne Vollan <[email protected]>
+
+ [Cocoa] Avoid waiting for Launch Services on every load
+ https://bugs.webkit.org/show_bug.cgi?id=215569
+
+ Reviewed by Darin Adler.
+
+ Currently, we are waiting for the Launch Services database to be present on every load in the WebContent process.
+ It should be sufficient to wait only on the first load. Since we now are waiting only once per WebContent process,
+ increase the maximum wait time from 1s to 5s.
+
+ No new tests, covered by existing tests.
+
+ * WebProcess/WebPage/Cocoa/WebPageCocoa.mm:
+ (WebKit::WebPage::platformDidReceiveLoadParameters):
+
2020-08-17 Jer Noble <[email protected]>
[Mac] Add Experimental Feature preference for SW VP9
Modified: trunk/Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm (265773 => 265774)
--- trunk/Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm 2020-08-17 21:35:36 UTC (rev 265773)
+++ trunk/Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm 2020-08-17 21:54:42 UTC (rev 265774)
@@ -65,14 +65,18 @@
void WebPage::platformDidReceiveLoadParameters(const LoadParameters& parameters)
{
#if HAVE(LSDATABASECONTEXT)
- auto startTime = WallTime::now();
- bool databaseUpdated = LaunchServicesDatabaseManager::singleton().waitForDatabaseUpdate(1_s);
- auto elapsedTime = WallTime::now() - startTime;
- if (elapsedTime.value() > 0.5)
- RELEASE_LOG(Loading, "Waiting for Launch Services database update took %f seconds", elapsedTime.value());
- ASSERT_UNUSED(databaseUpdated, databaseUpdated);
- if (!databaseUpdated)
- RELEASE_LOG_ERROR(Loading, "Timed out waiting for Launch Services database update.");
+ static bool hasWaitedForLaunchServicesDatabase = false;
+ if (!hasWaitedForLaunchServicesDatabase) {
+ auto startTime = WallTime::now();
+ bool databaseUpdated = LaunchServicesDatabaseManager::singleton().waitForDatabaseUpdate(5_s);
+ auto elapsedTime = WallTime::now() - startTime;
+ if (elapsedTime.value() > 0.5)
+ RELEASE_LOG(Loading, "Waiting for Launch Services database update took %f seconds", elapsedTime.value());
+ ASSERT_UNUSED(databaseUpdated, databaseUpdated);
+ if (!databaseUpdated)
+ RELEASE_LOG_ERROR(Loading, "Timed out waiting for Launch Services database update.");
+ hasWaitedForLaunchServicesDatabase = true;
+ }
#endif
m_dataDetectionContext = parameters.dataDetectionContext;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes