You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue reported also here rust-lang/rust#121354 - I also copied it here, because looks that this can be fixed by changing structure of slint files(but not sure if this is possible)
Copied content
When compiling recently project with release flag - cargo build --release I found that compilation takes more than 80 minutes. Debug build completes in ~8 minutes which is acceptable for me.
git clone https://github.com/qarmin/czkawka.git
cd czkawka/krokiet
time cargo build
time cargo build --release
Response https://gist.github.com/Nilstrieb/b3ec10b0408b75bfc5d68a3871d3d230
This is one of the files that slint helpfully generates for us for the main_window file, I assume.
I.. certainly don't blame SROA (which "ungroups" local variable structs into one local variable for every field) for being pathologically slow here.... that is.. a whole very lot of fields..
The fix here probably is to make SROA stop after some number of operations, to stop it from running off and turning this enormous mess into some rainbow wonderland where everything is a local variable after 80 minutes.
But there's also something pretty weird with the code. This struct has dozens of thousands of nested fields and a size of 241KB, which seems.. fun. Never having used slint, your source code looks reasonable to me, but slint generates quite a monstrosity from it...
In the meantime, you can use -Zmir-enable-passes=-ScalarReplacementOfAggregates on the nightly compiler to disable this pass (though the compile times are still pretty bad, understandably).
The text was updated successfully, but these errors were encountered:
Issue reported also here rust-lang/rust#121354 - I also copied it here, because looks that this can be fixed by changing structure of slint files(but not sure if this is possible)
Copied content
When compiling recently project with release flag -
cargo build --release
I found that compilation takes more than 80 minutes. Debug build completes in ~8 minutes which is acceptable for me.Cargo timing results:
debug - debug_cargo-timing-20240220T105545Z.html.zip
release - release_cargo-timing-20240220T110513Z.html.zip
Later I run
RUSTFLAGS="-Zself-profile" cargo +nightly rustc --release
and I got this resultsthis is output from
RUSTFLAGS="-Zself-profile" cargo +nightly rustc
During compilation, Slint generates single rust file with 90000 lines - main_window.rs.zip
repo - https://github.com/qarmin/czkawka/tree/7.0.0/krokiet
Response
https://gist.github.com/Nilstrieb/b3ec10b0408b75bfc5d68a3871d3d230
This is one of the files that slint helpfully generates for us for the main_window file, I assume.
I.. certainly don't blame SROA (which "ungroups" local variable structs into one local variable for every field) for being pathologically slow here.... that is.. a whole very lot of fields..
The fix here probably is to make SROA stop after some number of operations, to stop it from running off and turning this enormous mess into some rainbow wonderland where everything is a local variable after 80 minutes.
But there's also something pretty weird with the code. This struct has dozens of thousands of nested fields and a size of 241KB, which seems.. fun. Never having used slint, your source code looks reasonable to me, but slint generates quite a monstrosity from it...
In the meantime, you can use -Zmir-enable-passes=-ScalarReplacementOfAggregates on the nightly compiler to disable this pass (though the compile times are still pretty bad, understandably).
The text was updated successfully, but these errors were encountered: