Skip to content

Speedup shell calls.#80

Open
ZGl6YXNt wants to merge 1 commit into
eroshenkoam:mainfrom
ZGl6YXNt:speedup_shell_calls
Open

Speedup shell calls.#80
ZGl6YXNt wants to merge 1 commit into
eroshenkoam:mainfrom
ZGl6YXNt:speedup_shell_calls

Conversation

@ZGl6YXNt

@ZGl6YXNt ZGl6YXNt commented Nov 7, 2024

Copy link
Copy Markdown

Calling xcodebuild every time significantly increases execution time. So we need to call it once and cache the value.

@amidaleet

amidaleet commented Dec 4, 2024

Copy link
Copy Markdown

Thanks for your fix. Used locally, saved 10 min per .xcresult export!

Significant performance downgrade on 1.19.1 with Xcode 16.1.
Tests Scheme report export now takes 14 mins instead of 5 s (on Xcode 15.4).
Tests run itself takes less 😕

WIth this fix cache time lowered to ~ 4 min.
Still bad, but not that terrible though 🙂

@amidaleet

Copy link
Copy Markdown

As quick workaround for 1.19.1 version binary: xcodebuild call may be mocked with simple bash script via PATH.

In my case it lowered export duration to 5 min from 14 min.

export PATH="path/to/fake_xcodebuild_dir:$PATH"
xcresults export /path/to/Test.xcresult -o /path/to/outputDirectory

Where fake_xcodebuild_dir/xcodebuild executable file like:

#!/bin/bash

echo 'Xcode 16.1'
echo 'Build version 16B40'

xcodebuild -version is the only call to this binary inside xcresults code, so no side effects are expected.

@ZGl6YXNt ZGl6YXNt force-pushed the speedup_shell_calls branch from da8bba8 to cce9c4e Compare October 21, 2025 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants