mirror of
https://github.com/lldap/lldap.git
synced 2026-04-25 08:15:52 +03:00
[GH-ISSUE #1220] Compilation cycle is slow #434
Labels
No labels
backend
blocked
bug
cleanup
dependencies
docker
documentation
duplicate
enhancement
enhancement
frontend
github_actions
good first issue
help wanted
help wanted
integration
invalid
ldap
pull-request
question
rust
rust
tests
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/lldap-lldap#434
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @selfhoster1312 on GitHub (Jul 17, 2025).
Original GitHub issue: https://github.com/lldap/lldap/issues/1220
Simply rebuilding the lldap binary in release mode takes >2m on my machine (without dependent crates).
It's not even a slow machine!
I see there's opt flags in Cargo.toml for optimized binary size (opt-level=s) and optimized linking (lto=true), both of which can make compilation slower. I think these are good values for building release tarballs but should not be the default when cloning the repo.
The size-optimized binary (built with nightly in release mode from main branch) is 30MB. Removing those two lines in Cargo.toml produces a binary of 38MB, but takes me 2m30s for the entire build instead of just the lldap crate (which alone now takes 22s).
Building the frontend is not much faster using this config, yielding a 3.9MB wasm blob instead of 3.0MB in 41s total build vs 47s. In this case, i think these optimizations make sense.
I'm used to making release builds even during development. Maybe i should not? Two possibilities:
@nitnelave commented on GitHub (Jul 17, 2025):
I'm surprised that you're making release builds during development. Debug builds should be the default for dev, and even then most of the time rustc saves you the pain of compiling and cargo check does most of the rest. I basically only ever compile to run the tests or do final checks on the finished PR.
@nitnelave commented on GitHub (Oct 4, 2025):
I'm not sure there is anything for us to do here: compilation speed is a trade-off with performance of the binary, and it makes sense for release builds to take long to optimize an artifact that will be used in production. Debug is the other side of the tradeoff.