instruments-without-delay uses the DYLD_INSERT_LIBRARIES
environment variable to shim from the instruments command line all the way down to ScriptAgentShim
which is the iOS Simulator service responsible for interfacing UIAutomation JavaScript with the native UIAutomation.framework
. It uses a stack of shims, starting at the instruments
executable, going through Simulator.app
. It is an essential part of ios-driver as it removes a pesky 200ms delay that drastically slows down the process of executing end-to-end tests. This is a fixed cost that would occur on every command.
Other than a few things being moved around and renamed in Xcode 7, there is the new issue of the codesigning of the Simulator app that triggers amfid
whenever an unsigned image is loaded. This essentially means that we can't use DYLD_INSERT_LIBRARIES
on the Simulator Process with SimShim
It is however, possible to inject these environment variables at the launchdaemon level. There is a plist for DTServiceHub
at: /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/Developer/Library/LaunchDaemons/com.apple.instruments.deviceservice.plist
It can be modified to inject the DTMobileISShim
(see the attached plist). However, this is less than ideal as this requires modifying the Xcode binary.
@tarunchauhantft I did the following steps:
cd ~
git clone https://github.com/lawrencelomax/instruments-without-delay.git
cd instruments-without-delay/
git checkout xcode7-quirks
./build.sh
Next, you're going to want to edit the plist file at:
/Applications/Xcode-7.0.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/Developer/Library/LaunchDaemons/com.apple.instruments.deviceservice.plist
(I downloaded the library DTMobileISShim.dylib) and then added the path where it is found.
I restarted my MAC and i didn't notice any improvement in the performance.
Please can you give me the exact steps how you used it and noticed the difference in performance.
Thanks in advance