Skip to content

Improve compile/typecheck performance #18108

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

Conversation

aloucks
Copy link
Contributor

@aloucks aloucks commented Mar 1, 2025

Objective

#18103 (or at least significantly improves the situation)

Solution

Removed default-features = false from the bevy_* [dev-dependencies].

Testing

cargo check and rust-analayzer are now significantly faster.

@aloucks
Copy link
Contributor Author

aloucks commented Mar 1, 2025

It's probably worth investigating build-override opt-level too.

@mockersf
Copy link
Member

mockersf commented Mar 1, 2025

you should also remove the few default features of the crates that have some, and only enable them when needed

@alice-i-cecile
Copy link
Member

I don't understand why this would work; can you explain more?

@alice-i-cecile alice-i-cecile added C-Performance A change motivated by improving speed, memory usage or compile times A-Cross-Cutting Impacts the entire engine labels Mar 2, 2025
@alice-i-cecile alice-i-cecile added this to the 0.16 milestone Mar 2, 2025
@aloucks
Copy link
Contributor Author

aloucks commented Mar 2, 2025

I don't understand why this would work; can you explain more?

It had initially helped cargo check times for me in Rust-Analyzer and I initially believed it was due to the resolver wanting multiple copies of the crates with different feature sets. I've had issue with R-A being quite slow for a while now. A fresh cargo clean would sometimes fix the problem initially, but it would always return. I haven't yet experienced the issue after the last clean and suspect the problem is likely an R-A issue and not the same issue that @h3r2tic was describing. I'm going to close this for now and will revisit later if I have more definitive evidence.

@aloucks aloucks closed this Mar 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Cross-Cutting Impacts the entire engine 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.

3 participants