Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 75c2231885d2d0c348e4602f7b6094e065299e0b
      
https://github.com/WebKit/WebKit/commit/75c2231885d2d0c348e4602f7b6094e065299e0b
  Author: Per Arne Vollan <[email protected]>
  Date:   2026-02-03 (Tue, 03 Feb 2026)

  Changed paths:
    M Source/WebKit/UIProcess/BrowsingContextGroup.cpp
    M Source/WebKit/UIProcess/WebPageProxy.cpp
    M Source/WebKit/UIProcess/WebProcessCache.cpp
    M Source/WebKit/UIProcess/WebProcessCache.h
    M Source/WebKit/UIProcess/WebProcessPool.cpp
    M Source/WebKit/UIProcess/WebProcessPool.h
    M Source/WebKit/UIProcess/WebProcessProxy.h
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/SiteIsolation.mm

  Log Message:
  -----------
  [macOS] Improve page load performance by separating Web process cache entries 
between main frame and iframe processes
https://bugs.webkit.org/show_bug.cgi?id=306584
rdar://169014411

Reviewed by Sihui Liu and Ben Nham.

Improve page load performance by having separate Web process cache entries for 
mainframe and iframe processes on macOS.
This is a significant improvment in page load performance with Site Isolation 
enabled.

This fixes a fairly common issue where a page load is not able to use a cached 
Web process for the main frame, because
some other page has taken the cache entry for one of its iframes. One example 
is google.com, which is oftentimes loaded
in both mainframes and iframes.

This patch expands the existing IsSharedProcess enum to cover mainframe, 
subframe, and shared processes.

I am also working on a follow-up in 
https://github.com/WebKit/WebKit/pull/57339, which is partitioning by mainframe 
site.
The patch in that PR depends on the majority of changes in this patch, so I 
think it would be good to address that in a
separate patch.

API test: SiteIsolation.PartitionWebProcessCache

* Source/WebKit/UIProcess/WebProcessCache.cpp:
(WebKit::WebProcessCache::addProcess):
(WebKit::WebProcessCache::evictAtRandomIfNeeded):
(WebKit::WebProcessCache::takeProcess):
(WebKit::WebProcessCache::clearAllProcessesForSession):
(WebKit::WebProcessCache::removeProcess):
* Source/WebKit/UIProcess/WebProcessCache.h:
* Source/WebKit/UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::processForSite):
* Source/WebKit/UIProcess/WebProcessProxy.h:
* Tools/TestWebKitAPI/Tests/WebKitCocoa/SiteIsolation.mm:
(TestWebKitAPI::(SiteIsolation, PartitionWebProcessCache)):

Canonical link: https://commits.webkit.org/306712@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to