Linking taking a very long time? #21219
Unanswered
catbrained
asked this question in
Q&A
Replies: 2 comments 1 reply
-
https://bevy.org/learn/quick-start/getting-started/setup/#enable-fast-compiles-optional |
Beta Was this translation helpful? Give feedback.
1 reply
-
This is my build log, first build:
second build:
This may seem like a bug |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey, I'm sometimes seeing very long compile times even on simple projects and as far as I can tell it seems to be because of linking.
I'm talking upwards of 10 minutes.
Bevy version 0.16.1
I am using Rust 1.90.0, which uses lld by default.
CPU: AMD Ryzen 7 5800H
I have 16 GB of RAM on this machine, and during the build I consistently had about 2.1 GB of available memory according to btop. (Most of the memory was used by rust-analyzer and Firefox running in the background). I don't have swap enabled.
All data is on an NVME drive.
The build first showed a very large CPU usage, which then quickly dropped down to medium to low usage.
This issue is present even with incremental compilations on seemingly simple changes. For example, in the code below I removed the
FpsOverlayPlugin
,setup_system
,set_overlay_color_system
,OverlayColor
, and the associateduse
statements that are no longer needed. Thecargo build --timings
then took 10m 04s. (See the timings report gist)Am I doing something wrong?
The `Cargo.toml` for this project
The code for this project
objdump output
Beta Was this translation helpful? Give feedback.
All reactions