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

Long Compile Times: Dynamic Linking? #849

Open
zyansheep opened this issue Apr 30, 2021 · 4 comments
Open

Long Compile Times: Dynamic Linking? #849

zyansheep opened this issue Apr 30, 2021 · 4 comments
Labels
developer experience feature New feature or request

Comments

@zyansheep
Copy link

zyansheep commented Apr 30, 2021

I've used the Bevy game engine and I cannot live without the super fast (sometimes <1 second!) dynamic linking support. Is this possible to do with Iced? Being a UI library, Iced applications need lots of design iteration for styling & layout. However, iteration is made tedious with long compile times. Is it possible to implement a feature similar to Bevy's --features bevy/dynamic?

PR for this Issue: #867

@13r0ck
Copy link
Member

13r0ck commented Apr 30, 2021

no

@zyansheep
Copy link
Author

I'm not talking about hot reloading, more just dynamic linking with the lld linker and nightly rust for a significant speedup.

#21 (comment)
Seems to think that dynamic linking won't have much of an effect, but I have observed significant speedups with dynamic linking.

Modifying the main.rs file and recompliling using static linking takes around (6-7) seconds in my small-ish bevy project. While doing the same test using the --features bevy/dynamic reduces it to around (1-3) seconds. (Both using lld and nightly).
I'm going to try and implement this feature in iced to see if I can get similar improvements.

@13r0ck
Copy link
Member

13r0ck commented May 3, 2021

Oh gotcha, ya that isn't currently a feature, but you could create a PR for that feature that would be fantastic!

@hecrj hecrj added the feature New feature or request label May 4, 2021
@zyansheep
Copy link
Author

So, I managed to transfer the feature over from bevy and I got a slight iterative compile time improvement:

// Dynamic Compile Times: 2.49s, 2.53s, 2.40s, 2.76s, 2.26s, 2.45s
// Static Compile Times: 3.03s, 4.22s, 3.50s, 3.20s, 3.06s, 3.70s, 2.85s, 2.87s, 3.68s

Time for my PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
developer experience feature New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants