Build times for individual modules #955
-
Hi, I wanted to check if there's a way of getting a report of how long each module takes to build with TCA.
The current outcome is that I don't receive any of these warnings. Likely to be because the dependencies have their own space and they are not included on the .xcodeproj file itself. The expected outcome is either a file with logs with compile times for each file, method, class, etc. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Hi @kuriishu27! Are you asking how long TCA takes to build? On my machine, a completely clean build (which includes all TCA's dependencies) takes about 6 seconds, and subsequent builds are pretty much instantaneous. If I add the following build settings to the swiftSettings: [
.unsafeFlags([
"-Xfrontend", "-warn-long-expression-type-checking=100",
"-Xfrontend", "-warn-long-function-bodies=100",
])
] I don't get any warnings, because there are no expressions or function bodies that take over 100ms to build. |
Beta Was this translation helpful? Give feedback.
-
To complement Stephen answer, If you use SPM to define your targets you can do this targets: [
.target(name: "MyTarget", dependencies: []),
]
.map { (target: Target) in
target.swiftSettings = [.unsafeFlags([
"-Xfrontend",
"-warn-long-function-bodies=100",
"-Xfrontend",
"-warn-long-expression-type-checking=100"
])]
return target
} which is convenient to set those flags on all or at least multiple targets. |
Beta Was this translation helpful? Give feedback.
-
I found this extremely helpful and it's displaying the expected results. Thank you! |
Beta Was this translation helpful? Give feedback.
Hi @kuriishu27! Are you asking how long TCA takes to build? On my machine, a completely clean build (which includes all TCA's dependencies) takes about 6 seconds, and subsequent builds are pretty much instantaneous.
If I add the following build settings to the
ComposableArchitecture
module:I don't get any warnings, because there are no expressions or function bodies that take over 100ms to build.