Changeset 249341 in webkit


Ignore:
Timestamp:
Aug 30, 2019 1:23:00 PM (5 years ago)
Author:
achristensen@apple.com
Message:

Allow process cache to cache processes when using a non-default persistent WebsiteDataStore
https://bugs.webkit.org/show_bug.cgi?id=201329

Reviewed by Chris Dumez.

Treat all persistent sessions the same when deciding whether to clear all cached web processes using a particular website data store.
This removes a huge performance regression on warm plt when switching to using a non-default persistent session.
I also removed a call to removeSession which is redundant with the one in the WebsiteDataStore destructor, which is where it should be.

  • UIProcess/WebProcessCache.cpp:

(WebKit::WebProcessCache::canCacheProcess const):

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::pageBeginUsingWebsiteDataStore):
(WebKit::WebProcessPool::pageEndUsingWebsiteDataStore):

Location:
trunk/Source/WebKit
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r249339 r249341  
     12019-08-30  Alex Christensen  <achristensen@webkit.org>
     2
     3        Allow process cache to cache processes when using a non-default persistent WebsiteDataStore
     4        https://bugs.webkit.org/show_bug.cgi?id=201329
     5
     6        Reviewed by Chris Dumez.
     7
     8        Treat all persistent sessions the same when deciding whether to clear all cached web processes using a particular website data store.
     9        This removes a huge performance regression on warm plt when switching to using a non-default persistent session.
     10        I also removed a call to removeSession which is redundant with the one in the WebsiteDataStore destructor, which is where it should be.
     11
     12        * UIProcess/WebProcessCache.cpp:
     13        (WebKit::WebProcessCache::canCacheProcess const):
     14        * UIProcess/WebProcessPool.cpp:
     15        (WebKit::WebProcessPool::pageBeginUsingWebsiteDataStore):
     16        (WebKit::WebProcessPool::pageEndUsingWebsiteDataStore):
     17
    1182019-08-30  Wenson Hsieh  <wenson_hsieh@apple.com>
    219
  • trunk/Source/WebKit/UIProcess/WebProcessCache.cpp

    r248846 r249341  
    6767
    6868    auto sessionID = process.websiteDataStore().sessionID();
    69     if (sessionID != PAL::SessionID::defaultSessionID() && !process.processPool().hasPagesUsingWebsiteDataStore(process.websiteDataStore())) {
     69    if (sessionID.isEphemeral() && !process.processPool().hasPagesUsingWebsiteDataStore(process.websiteDataStore())) {
    7070        RELEASE_LOG(ProcessSwapping, "%p - WebProcessCache::canCacheProcess(): Not caching process %i because this session has been destroyed", this, process.processIdentifier());
    7171        return false;
  • trunk/Source/WebKit/UIProcess/WebProcessPool.cpp

    r249275 r249341  
    13141314
    13151315    auto sessionID = dataStore.sessionID();
    1316     if (sessionID.isEphemeral()) {
    1317         ASSERT(dataStore.parameters().networkSessionParameters.sessionID == sessionID);
     1316    if (sessionID != PAL::SessionID::defaultSessionID()) {
     1317        ASSERT(!sessionID.isEphemeral() || dataStore.parameters().networkSessionParameters.sessionID == sessionID);
    13181318        if (m_networkProcess) {
    13191319            m_networkProcess->addSession(makeRef(dataStore));
    13201320            dataStore.clearPendingCookies();
    13211321        }
    1322     } else if (sessionID != PAL::SessionID::defaultSessionID()) {
    1323         if (m_networkProcess) {
    1324             m_networkProcess->addSession(makeRef(dataStore));
    1325             dataStore.clearPendingCookies();
    1326         }
    13271322    }
    13281323}
     
    13401335        m_sessionToPageIDsMap.remove(iterator);
    13411336
    1342         if (sessionID == PAL::SessionID::defaultSessionID())
    1343             return;
    1344 
    1345         // The last user of this non-default PAL::SessionID is gone, so clean it up in the child processes.
    1346         if (networkProcess())
    1347             networkProcess()->removeSession(sessionID);
    1348 
    1349         m_webProcessCache->clearAllProcessesForSession(sessionID);
     1337        if (sessionID.isEphemeral())
     1338            m_webProcessCache->clearAllProcessesForSession(sessionID);
    13501339    }
    13511340}
Note: See TracChangeset for help on using the changeset viewer.