Enable Link-Time Optimization (LTO)
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 1/5
- Tempo stimato
- Meno di un'ora
- Idoneità per principianti
- 55/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Ferma
- Stack tecnologico
- rust
- Ambito
- build-system
Direzione di ricerca
Inizia da Cargo.toml e ispeziona il profilo di release esistente e la configurazione di build del workspace. Abilita LTO per il profilo di release previsto, quindi verifica che le build di release utilizzino questa impostazione e che i binari risultanti soddisfino l’obiettivo dell’issue di ridurre le dimensioni senza modificare le build di sviluppo.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Hi!
I noticed that in the Cargo.toml file Link-Time Optimization (LTO) for the project is not enabled. I suggest switching it on since it will reduce the binary size (always a good thing to have) and will likely improve the application's performance a bit.
I suggest enabling LTO only for the Release builds so as not to sacrifice the developers' experience while working on the project since LTO consumes an additional amount of time to finish the compilation routine. If you think that a regular Release build should not be affected by such a change as well, then I suggest adding an additional dist or release-lto profile where additionally to regular release optimizations LTO will also be added. Such a change simplifies life for maintainers and others interested in the project persons who want to build the most performant version of the application. Using ThinLTO should also help to reduce the build-time overhead with LTO. If we enable it on the Cargo profile level, users, who install the application with cargo install, will get the LTO-optimized version "automatically". E.g., check cargo-outdated Release profile.
Basically, it can be enabled with the following lines:
[profile.release]
lto = true
I have made quick tests (Fedora 40) by adding lto = true to the Release profile. The binary size reduction is the following:
lapdev: from 41 Mib to 33 Miblapdev-db: from 16 Mib to 12 Miblapdev-ws: from 20 Mib to 17 Miblapdev-guest-agent: from 592 Kib to 532 Kib
Thank you.
- Lingua principale
- Rust
- Stelle
- 2k
- Fork
- 58
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di lapce/lapdev
-
gnome container failed Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
-
HAXE SUPPORT Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 25/100
-
Docker Swarm Support Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
Tutte le issue di lapce/lapdev
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
gitbutlerapp/gitbutler#15998 · 1 commento ·
-
bug triage:deciding
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
open-telemetry/otel-arrow#4132 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100