Skip to content
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

Speed up fast compiles config #433

Merged
merged 9 commits into from
Sep 4, 2020
Merged

Conversation

ashneverdawn
Copy link
Contributor

On my late 2014 macbook, this makes my incremental builds take half as long. Mileage will vary depending on hardware and OS.

This speeds up compiles by reducing how much debug info is included to 'line tables only'
See: https://doc.rust-lang.org/nightly/cargo/reference/profiles.html#debug

@Moxinilian Moxinilian added C-Feature A new feature, making something new possible C-Performance A change motivated by improving speed, memory usage or compile times labels Sep 3, 2020
@cart
Copy link
Member

cart commented Sep 3, 2020

This seems like a nice win, but do you know what we're losing here by dropping to level 1? The rust docs arent very descriptive.

@memoryruins
Copy link
Contributor

It makes a similar change as -gline-tables-only in clang

Generate line number tables only.
This kind of debug info allows to obtain stack traces with function names, file names and line numbers (by such tools as gdb or addr2line). It doesn’t contain any other data (e.g. description of local variables or function parameters).

It ends up generating much less debuginfo while still being fairly useful for general panics and surface level debugging. It may be worth leaving a comment in the config that if more debugging information is required to comment the setting out (or set it back to the default 2).

@cart
Copy link
Member

cart commented Sep 3, 2020

ah so this would probably make using the live-debugger experience a bit worse

@cart
Copy link
Member

cart commented Sep 3, 2020

if the wins arent particularly measurable with lld, we could consider scoping this to macos only (where the difference is significant)

@memoryruins
Copy link
Contributor

memoryruins commented Sep 4, 2020

Scoping it to macos sounds reasonable. The link time differences has been much less significant for me on linux and windows while using lld. (though, I am still looking forward to split dwarf / debuginfo fission in rustc rust-lang/rust#34651 ).

@cart
Copy link
Member

cart commented Sep 4, 2020

Yeah on linux the change for me is ~0.05 seconds, which is measurable but im not sure its worth a reduced debugger experience.

@cart
Copy link
Member

cart commented Sep 4, 2020

If we can scope this to macos for now that would be great.

@ashneverdawn
Copy link
Contributor Author

Thanks for the feedback!
There doesn't appear to be a way to make that particular config mac only https://doc.rust-lang.org/cargo/reference/config.html
So, I've commented it out and added a description so it's upto the user to uncomment it if they want it.

@cart
Copy link
Member

cart commented Sep 4, 2020

Awesome awesome. Thanks

@cart cart merged commit 5f1fef3 into bevyengine:master Sep 4, 2020
mrk-its pushed a commit to mrk-its/bevy that referenced this pull request Oct 6, 2020
optionally make "fast build" config 40% faster on mac by removing some debug info
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-Feature A new feature, making something new possible C-Performance A change motivated by improving speed, memory usage or compile times
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants