-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suggest -Zrun-dsymutil-no for macOS fast compiles #552
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is amazing! By far the single-most effective incremental compilation speedup I've ever seen in debug mode!
I tested this out on a 16-core Mac Pro and incremental compilation in debug-mode decreased from an average of 7.74s to 2.16s. The difference is HUGE! Over 3x faster!
Clean compile time in debug mode decreased from an average of 53.83s to 46.71s. Looks like about the same absolute time savings, but much more modest percentage-wise here.
Given the time savings is fixed, I expect slower machines will see a smaller percentage savings, but still it's by far the biggest single improvement I've seen.
--
It is interesting to note that this has no measurable affect in release mode, either for clean compiles or incremental compiles. Even more interesting, incremental compiles in release mode averaged 1.82s (with or without the setting). Up until now I had assumed release mode would have slower incremental compiles.
Clean compiles in release mode are somewhat slower (62s), but that's to be expected.
@@ -2,6 +2,10 @@ | |||
|
|||
## Unreleased | |||
|
|||
### Added | |||
|
|||
- [Another fast compile flag for macOS][552] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- [Another fast compile flag for macOS][552] | |
- [Another fast compile flag for macOS that gives incremental compilation a big boost!][552] |
I went ahead and updated the config in @cart - this one's worth merging. |
This keeps original object files around after compilation in the event that debug information is needed.
Thanks a bunch! But give bjorn3 all the credit for this one; I just saw his issue, looked into it, and whipped up a PR. Glad to see it makes a big difference! |
What if you compile only dependencies with optimizations and without debuginfo? You can use |
Oooh this is really nice. im going to merge this as its a clear win, but feel free to follow up on @bjorn3's comment with another pr if it pans out. |
Using the following in my # Compile all the *dependencies* in optimized release mode even if `--release` is not passed in
[profile.dev]
opt-level = 3
debug = false
# But compile the project itself in debug mode if `--release` is not passed in
[profile.dev.package.punchball]
opt-level = 0
debug = true |
|
This keeps original object files around after compilation in the event that debug information is needed.
This keeps original object files around after compilation in the event that debug information is needed.
Resolves #527