-
Notifications
You must be signed in to change notification settings - Fork 9
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
Fatal Memory Leak during compilation #12
Comments
Ufff, sounds bad, sorry for that. I have no idea what could be the cause, except for perhaps the huge amount of files, which I can't really do anything about. If you figure out a fix, I would be happy to accept a PR |
I disabled zram and connected a mechanical drive where I added 16GiB swap. So far i could build the first stage of Leptos (is it hydration or SSR? I never know) but it took longer than an hour to build. I made these screenshots before I went to bed so I can't say how long it took actually. Nevertheless first stage built, but I had a syntax error and needed to build again. At least the first stage did not need to recompile the icon library. In the second stage where the SSR or hydration part is built (I don't know which) I had a similar picture, but after three hours and a rustc footprint of 10GiB the system became unresponsive again while swapping heavily. These photos were made when the UI stopped being refreshed (take a note at the "99,7 wa" on the top: After 4 hours I had to pull the plug as the system showed no activity on the internal, the external swap drive, and my bluetooth devices lost the connection. I could theoretically try on my Windows computer, but that one has even less (4GiB) RAM and I assume it's a question of RAM not CPU architecture. To mitigate this I think, based on #7, the icon categories could be put in 19 separate sub crates that could still be gated with the feature flags on the main crate to keep compatibility. AFAIK crates are the linking units in Rust and that way the build process could be split into smaller. memory-manageable workloads |
We already have the feature flags. Have you disabled default features and only included the features you need? that might help |
Can you check if the issue persists on v0.6.0? |
I will test it next week |
When building the project using
cargo leptos watch
memory and swap (zram) get gradually filled up by rustc whileCompiling phosphor-leptos v0.5.0
until the system becomes unresponsive. After watching this for 45 minutes I had to pull the plug and pray for no file system errors because it never stops accessing the drive. I had no memory issues before when building Rust packages on this device.Hardware: Raspberry Pi 4, 8GiB RAM
OS: Manjaro ARM/aarch64
Filesystem: btrfs
The text was updated successfully, but these errors were encountered: