
FaultOrdering
https://github.com/getsentry/FaultOrdering- Category
- Developer Tools
- Rank
- No. 953Tools index
- Pricing
- Open Source
- Type
- TOOL
- Builder
- getsentry
- GitHub
- 225 stars
- Latest release
- v1.0.2
- Date
About
Generate optimized order files from an Xcode UI test to speed up your iOS app launch by 20%+.
What it does
FaultOrdering observes which executable symbols an app touches during launch, then arranges those symbols for tighter placement by the linker. It drives the launch through an XCUITest, maps recorded addresses back to symbols, and returns the ordering as a test attachment.
Why it's ranked here
The approach targets a specific source of startup overhead with direct runtime observations rather than guesses. Its narrow focus is valuable, but adoption requires linker configuration, a dedicated UI test, an extra build, and careful matching of production compiler settings.
What's good
It supports simulator and physical-device collection, which matters when startup follows device-specific code paths. The setup closure can establish a representative signed-in state before measurement. Duplicate symbol names receive special handling, and unobserved symbols remain in the generated output after the measured set.
Tradeoffs
This is an invasive optimization workflow, not a drop-in profiler. The app needs a generated link map, the test target needs bundled access to it, and physical-device runs require embedding the dynamic framework. Collection also uses fixed waiting periods and several forced failures, making errors potentially slow and abrupt.
How to use it well
Use it when an iOS team already has reliable XCUITests and wants launch-sensitive linker ordering based on a representative production build. Run setup through the common signed-in journey and collect on hardware when device-only frameworks change startup. It does not measure broader performance problems or replace startup profiling.
Technical notes+
Package.swift declares Swift tools 6.0, iOS 16, C++14, and two library products, including a dynamic FaultOrdering library. Sources/FaultOrderingTests/Linkmap.swift parses the bundled link map, filters symbols, and maps text-section addresses. Sources/FaultOrderingTests/FaultOrderingTest.swift launches the app twice, exchanges data over loopback HTTP ports 38825 and 38824, waits 10 and 120 seconds, resolves sampled addresses against loaded-image slides, and writes an XCTAttachment named "order-file". Sources/EMGFaultOrdering/Constructor.mm installs breakpoints through SimpleDebugger, records program counters, and exposes results as JSON. run-test.sh demonstrates xcodebuild execution and attachment extraction with xcparse.
Observed
- License
- MIT License
- Primary language
- Swift, with Objective-C++ and Objective-C runtime instrumentation
- Installation
- Swift Package Manager package added directly to an Xcode project
- Interface
- XCTest library API that emits an XCTAttachment
- Platform
- iOS 16 or later; setup documentation requires Xcode 16.2 or later
- Package products
- FaultOrdering dynamic library and FaultOrderingTests library
- Dependencies
- SimpleDebugger 1.0.0 and FlyingFox 0.16.0 are pinned Swift package dependencies
- Included example
- Repository contains a SwiftUI demo app and an XCUITest integration example
Read from README.md, Package.swift, Sources/FaultOrderingSwift/Server.swift, Sources/FaultOrderingTests/Linkmap.swift, Sources/FaultOrderingTests/FaultOrderingTest.swift, Demos/DemoApp/DemoApp/DemoAppApp.swift, Demos/DemoApp/DemoApp/ContentView.swift, Demos/DemoApp/DemoAppUITests/DemoAppUITests.swift, LICENSE, run-test.sh, Package.resolved, Sources/EMGFaultOrdering/Constructor.mm, Sources/EMGFaultOrdering/EMGObjCHelper.h, Sources/EMGFaultOrdering/EMGObjCHelper.m, Demos/DemoApp/DemoApp.xcodeproj/project.pbxproj.
What it can do
Generate optimized order files from Xcode UI tests
Xcode UI test results → Optimized order files
Analyze iOS app launch performance
iOS app launch data → Performance analysis results
Optimize iOS app launch speed
iOS app binary and test data → 20%+ faster app launch performance
Process Xcode test execution data
Xcode UI test execution logs → Processed test data for optimization
Tags
Tech Stack
Media

Comments (0)
No comments yet
Editorially curated, with community endorsements as a secondary signal. Corrections welcome.