Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c626fbfed63e03e52037b6afd26141ca78608063
      
https://github.com/WebKit/WebKit/commit/c626fbfed63e03e52037b6afd26141ca78608063
  Author: Chris Dumez <[email protected]>
  Date:   2024-04-12 (Fri, 12 Apr 2024)

  Changed paths:
    M Source/WebKit/Shared/AuxiliaryProcess.h
    M Source/WebKit/Shared/AuxiliaryProcess.messages.in
    M Source/WebKit/Shared/Cocoa/AuxiliaryProcessCocoa.mm
    M Source/WebKit/UIProcess/AuxiliaryProcessProxy.cpp
    M Source/WebKit/UIProcess/AuxiliaryProcessProxy.h
    M Source/WebKit/UIProcess/Cocoa/AuxiliaryProcessProxyCocoa.mm

  Log Message:
  -----------
  Cache preferences updated while child process was suspended
https://bugs.webkit.org/show_bug.cgi?id=272572

Reviewed by Per Arne Vollan.

Whenever system preferences change, the UIProcess detects this and broadcasts
the changes to every child process via IPC. A lot of these processes are often
suspended, which means that they're not processing incoming IPC and the IPC
queue will grow, using more and more memory.

To reduce memory usage in such cases, I am now caching preference updates
happening during suspension in a HashMap. This saves memory because there is no
IPC overhead. Also, when the same preferences changes several times, we just
overwrite it in the map, instead of queuing a new IPC message. Once the process
resumes, we send all updated preferences in a single IPC instead of one per
preference change.

* Source/WebKit/Shared/AuxiliaryProcess.h:
* Source/WebKit/Shared/AuxiliaryProcess.messages.in:
* Source/WebKit/Shared/Cocoa/AuxiliaryProcessCocoa.mm:
(WebKit::AuxiliaryProcess::preferencesDidUpdate):
* Source/WebKit/UIProcess/AuxiliaryProcessProxy.cpp:
(WebKit::AuxiliaryProcessProxy::didChangeThrottleState):
* Source/WebKit/UIProcess/AuxiliaryProcessProxy.h:
(WebKit::AuxiliaryProcessProxy::didChangeThrottleState): Deleted.
* Source/WebKit/UIProcess/Cocoa/AuxiliaryProcessProxyCocoa.mm:
(WebKit::AuxiliaryProcessProxy::notifyPreferencesChanged):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to