Skip to content

Use Thin LTO and codegen-units=1 for release#4383

Open
In-line wants to merge 1 commit into
TabbyML:mainfrom
In-line:patch-1
Open

Use Thin LTO and codegen-units=1 for release#4383
In-line wants to merge 1 commit into
TabbyML:mainfrom
In-line:patch-1

Conversation

@In-line

@In-line In-line commented Oct 20, 2025

Copy link
Copy Markdown

No description provided.

@In-line

In-line commented Oct 20, 2025

Copy link
Copy Markdown
Author

Size with PR on aarch64 MacOS 1.90 Rust (cargo bloat --release -p tabby)

     Finished `release` profile [optimized] target(s) in 3m 25s
    Analyzing target/release/tabby

 File  .text     Size            Crate Name
 0.2%   0.6% 157.6KiB        [Unknown] _ts_lex
 0.2%   0.6% 143.6KiB    tabby_schema? <tabby_schema::schema::Query as juniper::types::base::GraphQLType<__S>>::meta
 0.2%   0.6% 143.6KiB        [Unknown] _ts_lex
 0.1%   0.4% 113.9KiB        [Unknown] _ts_lex
 0.1%   0.4%  89.6KiB        [Unknown] _ts_lex
 0.1%   0.3%  77.5KiB       bitpacking bitpacking::bitpacker4x::neon::decompress_to
 0.1%   0.3%  72.2KiB        [Unknown] _ts_lex
 0.1%   0.3%  70.5KiB       bitpacking bitpacking::bitpacker4x::scalar::decompress_to
 0.1%   0.3%  69.7KiB       bitpacking bitpacking::bitpacker4x::neon::decompress_to
 0.1%   0.2%  63.6KiB    tabby_schema? <tabby_schema::schema::Mutation as juniper::types::base::GraphQLType<__S>>::meta
 0.1%   0.2%  60.4KiB  tabby_webserver tabby_webserver::service::background_job::start::{{closure}}::{{closure}}
 0.1%   0.2%  54.0KiB       bitpacking bitpacking::bitpacker4x::scalar::decompress_to
 0.1%   0.2%  53.9KiB        octocrab? <octocrab::models::_::<impl serde::de::Deserialize for octocrab::models::Repository>::deseriali...
 0.1%   0.2%  53.7KiB        octocrab? <octocrab::models::_::<impl serde::de::Deserialize for octocrab::models::Repository>::deseriali...
 0.1%   0.2%  48.3KiB nvml_wrapper_sys nvml_wrapper_sys::bindings::NvmlLib::from_library
 0.1%   0.2%  48.2KiB         tantivy? <tantivy::aggregation::agg_req::_::<impl serde::de::Deserialize for tantivy::aggregation::agg_r...
 0.1%   0.2%  46.3KiB        [Unknown] _sqlite3VdbeExec
 0.0%   0.2%  42.4KiB        [Unknown] _ts_lex
 0.0%   0.2%  41.8KiB        [Unknown] _ts_lex
 0.0%   0.1%  36.9KiB        [Unknown] _ts_lex
27.4%  94.2%  23.5MiB                  And 37680 smaller methods. Use -n N to show more.
29.1% 100.0%  24.9MiB                  .text section size, the file size is 85.6MiB

Without PR

    Finished `release` profile [optimized] target(s) in 2m 01s
    Analyzing target/release/tabby

 File  .text     Size           Crate Name
 0.2%   0.6% 157.6KiB       [Unknown] _ts_lex
 0.1%   0.5% 143.6KiB       [Unknown] _ts_lex
 0.1%   0.4% 113.9KiB       [Unknown] _ts_lex
 0.1%   0.3%  89.6KiB       [Unknown] _ts_lex
 0.1%   0.3%  72.2KiB       [Unknown] _ts_lex
 0.0%   0.2%  46.3KiB       [Unknown] _sqlite3VdbeExec
 0.0%   0.1%  42.4KiB       [Unknown] _ts_lex
 0.0%   0.1%  41.8KiB       [Unknown] _ts_lex
 0.0%   0.1%  37.3KiB       octocrab? <octocrab::models::_::<impl serde::de::Deserialize for octocrab::models::Repository>::deserializ...
 0.0%   0.1%  36.9KiB       [Unknown] _ts_lex
 0.0%   0.1%  36.8KiB tabby_webserver <octocrab::models::_::<impl serde::de::Deserialize for octocrab::models::Repository>::deserializ...
 0.0%   0.1%  36.1KiB tabby_webserver tabby_webserver::service::background_job::start::{{closure}}::{{closure}}
 0.0%   0.1%  32.6KiB       [Unknown] _aux_sym_identifier_token1_character_set_2
 0.0%   0.1%  32.6KiB       [Unknown] _aux_sym_identifier_token1_character_set_3
 0.0%   0.1%  32.5KiB    nvml_wrapper nvml_wrapper_sys::bindings::NvmlLib::from_library
 0.0%   0.1%  32.5KiB       [Unknown] _sym_keyword_character_set_6
 0.0%   0.1%  32.5KiB       [Unknown] _aux_sym_identifier_token1_character_set_5
 0.0%   0.1%  32.5KiB       [Unknown] _aux_sym_identifier_token1_character_set_4
 0.0%   0.1%  32.5KiB       [Unknown] _sym_keyword_character_set_4
 0.0%   0.1%  32.5KiB       [Unknown] _sym_keyword_character_set_5
27.8%  96.1%  26.9MiB                 And 62264 smaller methods. Use -n N to show more.
29.0% 100.0%  27.9MiB                 .text section size, the file size is 96.5MiB

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

Successfully merging this pull request may close these issues.

1 participant