-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Any way to increase iteration speed? #638
Comments
Maybe ramdisk will help you? |
It's true that Rust has a slow compile time for several reasons, but 10 seconds for that is way too much. I'm suspicious it could be a hardware issue (from what I gathered, not sure if the 16" model has the same issue) as my air-cooled Ryzen 5 2400G recompiles my quite substantial hexview demo in half that time when changing a couple lines, sometimes even a little bit less. But there's a way to reduce compile times a little bit, described here. Might be worth a try. |
I don't believe it's thermals related, the 16" model has a redesigned body with much larger air intakes and bigger fans to improve airflow. But it shouldn't make a difference either way compiling what is essentially a Hello World app from idle. I don't believe it's IO bound either, I had a Ryzen 3900X PC with 1TB Evo 970 NVMe SSD that compiled our whole monorepo at the same speed (slightly slower actually, maybe because Windows...) as this laptop. |
Use cargo build incremental |
That's because in debug builds incremental is enabled by default. Have you tried the linker approach I mentioned in my previous post? Still, I can't see a reason why an i9 would be slower than a 2nd gen Ryzen, even if it's a mobile chip. What could possibly be going on? |
Thanks @manokara, I just tried that (was a bit busy at the time). With rustc 1.50 nightly and zld 1.2.1 the debug build now takes 6.29s, which is obviously a massive difference 👍, although I wouldn't mind improving it further :) |
One thing I noticed is that after upgrading to macOS 11.0.1 VS Code got slower because of this issue: microsoft/vscode#105446 (comment) |
These tweaks worked really well for me, check out the PR I referenced ☝️ |
Thanks @cryptoquick, they worked for me too, that's what I was referring to here: #638 (comment) |
@yay If you're currently using a Mac that costs less than $5000, you're almost definitely not using a comparable CPU. My CPU has a TDP of 105W. However, I also noticed that your build key recommendation seemed to be ignored in my screenshot, as I understand @manokara pointed out. Are you using zld, like the bevy instructions indicated? You also have to add the .cargo/config.toml, and be using nightly. EDIT: I just read the comment you linked, haha, I'm tired. Yeah, that's what I did too, just with lld on my LInux desktop. |
@cryptoquick Haha, no worries, sadly, I am using a MBP that is worth £4000 with i9-9980H inside. And reading tweets like this makes me think I'll have to upgrade next year: https://twitter.com/rikarends/status/1328598935380910082 |
@yay Hold out for the M1X 😉 |
@cryptoquick I did :) and it's a big help! Now waiting for mold to come to macOS 😛 |
Hello, I'm playing with the basic examples, like a single button changing the window title on click. But every time I run the app after making a change to the title string it takes a little over 10 seconds to recompile (on a 16" i9 MBP).
This is really disappointing coming from both web apps and native apps (Swift/SwiftUI, Delphi/VCL or C++/Qt based). At least when we are talking about basic apps like this.
Any way to improve this? I know the native frameworks I mentioned use dynamic libraries for the framework code while Rust has to recompile from source, but I'm really wondering about solutions rather than reasons for slow compile times.
I'm using the recently released iced 0.2 and Rust 1.48 on macOS 11.1
The text was updated successfully, but these errors were encountered: