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

Changeset 277447 in webkit


Ignore:
Timestamp:
May 13, 2021, 12:45:02 PM (5 years ago)
Author:
Chris Dumez
Message:

Process suspension may be delayed by up to 5 seconds after there is no longer any database activity
https://bugs.webkit.org/show_bug.cgi?id=225774

Reviewed by Geoffrey Garen.

Use a 1 second HysteresisActivity in WebSQLiteDatabaseTracker instead of a 5 seconds one.
I frequently see our processes' suspension getting delayed by 5 seconds when homing out of
MobileSafari due to database activity. This change should help with that.

  • Shared/WebSQLiteDatabaseTracker.cpp:

(WebKit::WebSQLiteDatabaseTracker::WebSQLiteDatabaseTracker):

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r277446 r277447  
     12021-05-13  Chris Dumez  <cdumez@apple.com>
     2
     3        Process suspension may be delayed by up to 5 seconds after there is no longer any database activity
     4        https://bugs.webkit.org/show_bug.cgi?id=225774
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        Use a 1 second HysteresisActivity in WebSQLiteDatabaseTracker instead of a 5 seconds one.
     9        I frequently see our processes' suspension getting delayed by 5 seconds when homing out of
     10        MobileSafari due to database activity. This change should help with that.
     11
     12        * Shared/WebSQLiteDatabaseTracker.cpp:
     13        (WebKit::WebSQLiteDatabaseTracker::WebSQLiteDatabaseTracker):
     14
    1152021-05-13  Chris Dumez  <cdumez@apple.com>
    216
  • trunk/Source/WebKit/Shared/WebSQLiteDatabaseTracker.cpp

    r263038 r277447  
    3838WebSQLiteDatabaseTracker::WebSQLiteDatabaseTracker(IsHoldingLockedFilesHandler&& isHoldingLockedFilesHandler)
    3939    : m_isHoldingLockedFilesHandler(WTFMove(isHoldingLockedFilesHandler))
    40     , m_hysteresis([this](PAL::HysteresisState state) { setIsHoldingLockedFiles(state == PAL::HysteresisState::Started); })
     40    , m_hysteresis([this](PAL::HysteresisState state) { setIsHoldingLockedFiles(state == PAL::HysteresisState::Started); }, 1_s)
    4141{
    4242    ASSERT(RunLoop::isMain());
Note: See TracChangeset for help on using the changeset viewer.