[webkit-changes] [WebKit/WebKit] 501409: [webkitpy] SimulatedDeviceManager.initialize_devic...

Ben noreply at github.com
Wed Dec 11 18:51:04 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 50140920094471b706bb200855128b5d25b6976a
      https://github.com/WebKit/WebKit/commit/50140920094471b706bb200855128b5d25b6976a
  Author: Ben Schwartz <ben_schwartz at apple.com>
  Date:   2024-12-11 (Wed, 11 Dec 2024)

  Changed paths:
    M Tools/Scripts/webkitpy/xcode/simulated_device.py
    M Tools/Scripts/webkitpy/xcode/simulated_device_unittest.py

  Log Message:
  -----------
  [webkitpy] SimulatedDeviceManager.initialize_devices should rebuild the dyld shared cache before booting simulators with none already booted.
https://bugs.webkit.org/show_bug.cgi?id=284494
rdar://141316056

Reviewed by Jonathan Bedard.

If booted before the dyld shared cache has a chance to populate, simulator
processes under SimulatorTrampoline appear to load all of the relevant
frameworks into memory for each process. This is causing severe simulator
performance regressions, which slows down testing and eats into host device
swap memory (especially when using multiple simulators in parallel).

Anecdotal API test stats (running 1 simulator):
 - No dyld shared cache: 3:00:51
 - With dyld shared cache: 1:44:57

For this reason, if no simulators are booted, we should rebuild the dyld shared
cache before booting new ones.

* Tools/Scripts/webkitpy/xcode/simulated_device.py:
    -> (SimulatedDeviceManager.Runtime.__init__): Add new properties.
    -> (SimulatedDeviceManager.Runtime.rebuild_dyld_shared_cache): Add new function that rebuilds the shared cache for the runtime.
    -> (SimulatedDeviceManager.initialize_devices): Call rebuild_dyld_shared_cache if no simulators are booted.
* Tools/Scripts/webkitpy/xcode/simulated_device_unittest.py: Adjusting unit test mock input from simctl json.

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



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


More information about the webkit-changes mailing list