Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 7d015b7c0f7a00805f719bf96e04f2f33b2ff77d
      
https://github.com/WebKit/WebKit/commit/7d015b7c0f7a00805f719bf96e04f2f33b2ff77d
  Author: Per Arne Vollan <pvol...@apple.com>
  Date:   2023-07-24 (Mon, 24 Jul 2023)

  Changed paths:
    M Source/WTF/wtf/RAMSize.cpp
    M Source/WTF/wtf/RAMSize.h
    M Source/WebKit/UIProcess/WebProcessCache.cpp
    M Source/WebKit/UIProcess/WebProcessProxy.cpp
    M Source/WebKit/WebProcess/WebProcess.cpp

  Log Message:
  -----------
  Enable Web process cache on iOS
https://bugs.webkit.org/show_bug.cgi?id=258978
rdar://111908431

Reviewed by Brent Fulgham.

Enable the Web process cache on iOS by addressing an issue where the physical 
memory size in GB is reported as zero,
causing the process cache capacity to be set to zero. This is because the 
jetsam limit is taken into consideration
in this computation on iOS. This patch adds a function that returns the memory 
size without considering the jetsam
limit of the calling process. This patch also delays releasing memory when 
preparing to suspend, since this is
further improving the page load speed when reusing a process from the cache. 
Releasing the memory is delayed until
we drop the last assertion, which will suspend the process. Until then, the 
process is running and able to respond
to memory pressure warnings from the system and releasing memory. Furthermore, 
the process is not added to the cache
if assertions are being held, preventing it from suspending. This is a fix for 
a regression in page load speed we
see on http://www.youtube.com when adding it to the cache. This change is a 
speedup on page load benchmarks.

* Source/WTF/wtf/RAMSize.cpp:
(WTF::ramSizeDisregardingJetsamLimit):
* Source/WTF/wtf/RAMSize.h:
* Source/WebKit/UIProcess/WebProcessCache.cpp:
(WebKit::WebProcessCache::updateCapacity):
* Source/WebKit/UIProcess/WebProcessProxy.cpp:
* Source/WebKit/WebProcess/WebProcess.cpp:

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


_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to