Repository navigation
Conversation
…mall CI hosts Seed the simulator's launchd overrides before Harness boots it, so the services never start, and align the service list with simslim v0.9.0. Temporarily run the iOS E2E job as a seeded/live A/B with host pressure sampling.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is this?
This PR makes Harness boot iOS simulators on small CI hosts with their unused background services already off, instead of stopping them after a full boot. On the standard GitHub macOS runner (3 cores, 7 GB), the iOS E2E job drops from about 17–18 minutes to about 9–10 minutes.
Until now, Harness let the simulator boot with roughly 180 services running (photo analysis, widgets, Siri, iCloud sync and so on), then stopped 57 of them one
launchctlcall at a time. On a starved runner that step alone took 100–120 seconds, sometimes hit its 2-minute cap, and the boot had already paid the CPU and memory cost of starting those services. The code also assumed the disabled state lived only in CoreSimulator's memory and had to be redone on every boot. That assumption is wrong.How does it work?
On iOS 18.5 and later, the simulator's
launchd_simkeeps its disable overrides in a file on the host,/private/var/tmp/com.apple.CoreSimulator.SimDevice.<UDID>/disabled.plist, and reads it when the simulator starts. simslim uses the same file. When Harness boots a shut-down simulator on a host where slimming applies (CI with 3 cores or less than 8 GB, orslimOnCI), it first merges the services to disable into that file. The simulator then boots without starting them.After boot, Harness reads launchd's state and only acts on services that are still enabled or running. After a pre-written boot this takes about 4 seconds and catches the occasional service that starts anyway. On iOS 18.4 and earlier, where launchd ignores the file, the same step stops the services after boot as before. A simulator that is already booted when Harness starts is left as it is.
The service list now follows simslim v0.9.0's default profile, with its
storeandwebcategories left on so push notifications, StoreKit, in-app purchases and universal links keep working. Compared with the previous list, it turns off more (wallpapers, Spotlight, on-device intelligence, health, messaging and more; 144 services). It no longer disablesroutined,biomed,biomesyncdandnanoprefsyncd.2, which simslim found break a simulator's boot. It also leavesgamedon, which XCUITest app launches wait on for about 10 seconds, andassistantd, without which Spotlight leaks memory.This repo's iOS E2E and crash-validation jobs no longer boot the simulator in a workflow step, so Harness boots it and the services are off from the start.
Why is this useful?