Comments (11)
Overall, this work fundamentally improves perf end to end ( excluding the aspect phase ). Here's an update of the current state.
Fixes ( not comprehensive )
- [XCHammer / XcodeGen] #74 fixes an added 1+ magnitude explosion of runtime
- [XCHammer] #82 / #77 dramatically improves XCHammer ->
XcodeGen.ProjectSpec
runtime - [XcodeGen] yonaskolb/XcodeGen#417 fixes XcodeGen settings cache misses
- [XcodeGen] #78 - bumps Xcodegen for multiple fixes and improvements
- [CI] #74 Add pathological header example to the CI
Results
On the input projects in Fast and Reproducible builds with XCHammer there is a large boost from the base baseline commit - 9b716272ef2443758304ba2f50aa297753617c22
XCHammer: Generating project 1
XCHammer: Generating project 2
XCHammer: Generating project 3
XCHammer: Generating project 4
XCHammer: ** Completed compute_deps_hash in 0.0383s
XCHammer: Converting to XcodeGen specification
XCHammer: ** Completed compute_deps_hash in 0.1262s
XCHammer: Converting to XcodeGen specification
XCHammer: ** Completed compute_deps_hash in 0.6285s
XCHammer: Converting to XcodeGen specification
XCHammer: ** Completed convert_targets in 0.5510s
XCHammer: Writing project
XCHammer: ** Completed xcode_gen in 0.9709s
XCHammer: ** Completed make_schemes in 0.0384s
XCHammer: ** Completed generate_project in 1.7408s
XCHammer: ** Completed compute_deps_hash in 3.4395s
XCHammer: Converting to XcodeGen specification
XCHammer: ** Completed convert_targets in 0.2364s
XCHammer: Writing project
XCHammer: ** Completed convert_targets in 22.4880s
XCHammer: Writing project
XCHammer: ** Completed xcode_gen in 5.2703s
XCHammer: ** Completed make_schemes in 0.0364s
XCHammer: ** Completed generate_project in 28.4581s
XCHammer: ** Completed convert_targets in 33.5790s
XCHammer: Writing project
XCHammer: ** Completed xcode_gen in 1.2566s
XCHammer: ** Completed make_schemes in 0.0424s
XCHammer: ** Completed generate_project in 35.0194s
XCHammer: ** Completed xcode_gen in 59.3590s
XCHammer: ** Completed make_schemes in 0.0411s
XCHammer: ** Completed generate_project in 63.1091s
XCHammer: Generating project 1
XCHammer: Generating project 2
XCHammer: Generating project 3
XCHammer: Generating project 4
XCHammer: ** Completed compute_deps_hash in 0.0339s
XCHammer: Converting to XcodeGen specification
XCHammer: ** Completed compute_deps_hash in 0.1287s
XCHammer: Converting to XcodeGen specification
XCHammer: ** Completed convert_targets in 0.2452s
XCHammer: Writing project
XCHammer: ** Completed compute_deps_hash in 0.6981s
XCHammer: Converting to XcodeGen specification
XCHammer: ** Completed xcode_gen in 1.0542s
XCHammer: ** Completed convert_targets in 1.4144s
XCHammer: Writing project
XCHammer: ** Completed make_schemes in 0.1034s
XCHammer: ** Completed generate_project in 1.6039s
XCHammer: ** Completed xcode_gen in 1.1223s
XCHammer: ** Completed make_schemes in 0.0781s
XCHammer: ** Completed generate_project in 2.7515s
XCHammer: ** Completed convert_targets in 2.8335s
XCHammer: Writing project
XCHammer: ** Completed compute_deps_hash in 3.5735s
XCHammer: Converting to XcodeGen specification
XCHammer: ** Completed convert_targets in 0.3056s
XCHammer: Writing project
XCHammer: ** Completed xcode_gen in 5.0587s
XCHammer: ** Completed make_schemes in 0.0715s
XCHammer: ** Completed generate_project in 8.7044s
XCHammer: ** Completed xcode_gen in 27.6250s
XCHammer: ** Completed make_schemes in 0.0725s
XCHammer: ** Completed generate_project in 31.6097s
One of the best parts of this, is we see a 15s
reduction in the hottest codepath:
XCHammer: ** Completed convert_targets in 19.0124s
XCHammer: Writing project
XCHammer: ** Completed xcode_gen in 4.6072s
XCHammer: ** Completed make_schemes in 0.0399s
XCHammer: ** Completed generate_project in 24.1839s
XCHammer: ** Completed convert_targets in 3.1079s
XCHammer: Writing project
XCHammer: ** Completed xcode_gen in 5.9105s
XCHammer: ** Completed make_schemes in 0.1028s
XCHammer: ** Completed generate_project in 9.9739s
Huge thanks to @kastiglione and @yonaskolb for contributing multiple PRs and reviews 👏 ❤️
There's still a few outstanding PRs to conclude. I'd also suggest
- improving perf regression testing CI job
- adding more edge case'y projects as samples / test cases: e.g. one with a deep dep graph to guard against N^2 traversal scenarios 🔥
- having a nightly CI job to test the
HEAD
of XcodeGen / xcproj - setting up a slack bot to report results ( and perf figures )
from xchammer.
I'm investigating. I'll link to PRs here.
from xchammer.
@kastiglione - thanks so much sir!
I can reproduce it on the recent XcodeGen update:
- .revision("2ebfc9a9dc23ce029b81da8408d8991a9fc77a58")),
+ .exact("1.11.2")),
I want to add an iOS app with some large pods, including boost, react native. These libs seems to make the XcodeGen phase choke ( xcode_gen
in the XCHammer stdout ) 🔥
from xchammer.
from xchammer.
@kastiglione - awesome, I'll give that a try here today or next week.
I just added a pretty good perf test case to XCHammer directly, which seems to evoke the perf regression in XcodeGen: #74
from xchammer.
from xchammer.
@kastiglione - much appreciated! I'll run through kylef/PathKit#58 today as well!
I profiled the Frankenstein
example this morning, and it seems to spend a lot of time in Copy Files
, which makes sense - this might be related to #49 .
from xchammer.
#77 fixes a performance problem that's in XCHammer itself.
from xchammer.
@kastiglione thanks so much for submitting the PRs 🎉
I've submitted #58 to update XcodeGen
to the tip of master to include other PRs over there. I was able to reduce the runtime of the example significantly by removing the copy headers phase which was recently instrumented in XcodeGen
. It looks like that issue only impacts static libs with headers. PR to come in a few mins.
Additionally, I discovered the entire program was spending a lot of time working with Path
structs - kylef/PathKit#59 fixes that by using a class. I'll try to get some perf data for this.
I found a similar issue with ProjectSpec.TargetSource
and others, but will have to spend more time testing and profiling that one
from xchammer.
It might be worthwhile to test replacing Path with an alias to string - the data type seems to exist only to call functions with a string. I’ll try and benchmark this tomorrow AM
from xchammer.
from xchammer.
Related Issues (20)
- Xcode -> Bazel Debugger integration may stop working under certain situations HOT 2
- Could not find a dSYM bundle named "PinterestDevelopment.app.dSYM"
- [Focus] INFO: missing aspect:
- Fatal error: Duplicate values for key: 'PINFoundation':
- Comparison between Tulsi and XCHammer HOT 1
- more details in xchammer Diags.bzl tool comment
- Mysterious error message: "not all outputs were created or valid" HOT 2
- README may be incorrect about vending XCHammer.app HOT 1
- Determine path forward to remove or further embrace xcconfig
- Can't build XCHammer with Xcode 12 GM + Bazel 3.5.0 HOT 3
- Running from rule fails: Missing XCHammerAssets (& more) HOT 9
- cyclic dependency error
- sample/Tailor does not work
- Error: 'ObjcProvider' value has no field or method 'include'
- Error: 'SwiftInfo' value has no field or method 'swift_version HOT 3
- `load("@xchammer//:BazelExtensions/xcodeproject.bzl", "xcode_project")` instead of `load("@xchammer//:xcodeproject.bzl", "xcode_project")`? HOT 1
- invalid driver name when building in xcode HOT 1
- undefined symbol when building barebones mac app HOT 1
- Repository '@xchammer_tulsi_aspects' is not defined
- bzlmod support / Bazel 7.0
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xchammer.