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

Enable Link-Time Optimization (LTO) for lnav #1384

Open
tstack opened this issue Feb 11, 2025 · 0 comments
Open

Enable Link-Time Optimization (LTO) for lnav #1384

tstack opened this issue Feb 11, 2025 · 0 comments

Comments

@tstack
Copy link
Owner

tstack commented Feb 11, 2025

Discussed in #1376

Originally posted by zamazan4ik January 21, 2025
Hi!

I suggest enabling Link-Time Optimization (LTO) for lnav (-flto option in GCC and Clang compilers). It allows to the compiler perform better optimizations that results in most cases to higher performance and smaller binaries (I found at least one mention of LTO in this repo). I am not an expert in lnav's build scripts, to be honest but quickly checked build scripts for GitHub CI and scripts like this - as far as I understand, LTO is not enabled.

I see here two options:

  • Enable LTO only for published on the official website binaries. In this case, users, who download official binaries from the official website, will get LTO-optimized versions. People who use binaries from repositories - will rely on maintainers. People who build binaries on their own - it's up to them to enable LTO.
  • Enable LTO in all build scripts by default. In this case, users, who download official binaries from the official website, will get LTO-optimized versions. People who use binaries from repositories - will rely on maintainers (by default LTO will be enabled in their scripts but maintainers can disable it if they are interested). People who build binaries on their own - by default they'll get an LTO-optimized version but they will be able to disable it if they want to do it.

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant