stm_app icon indicating copy to clipboard operation
stm_app copied to clipboard

Binary size reduction

Open rimutaka opened this issue 4 years ago • 0 comments

Cargo bloat

 File  .text    Size             Crate Name
 0.3%   1.1% 44.5KiB             regex <regex::exec::ExecNoSync as regex::re_trait::RegularExpression>::captures_read_at
 0.3%   1.0% 41.0KiB      stackmuncher stackmuncher::cmd_munch::run::{{closure}}
 0.3%   0.9% 37.1KiB      stackmuncher stackmuncher::config::AppConfig::new::{{closure}}
 0.3%   0.8% 32.5KiB                h2 h2::codec::framed_read::decode_frame
 0.2%   0.7% 26.9KiB                h2 h2::proto::connection::DynConnection<B>::recv_frame
 0.2%   0.6% 24.4KiB             regex regex::exec::ExecBuilder::build
 0.2%   0.6% 23.7KiB      stackmuncher stackmuncher::cmd_config::get_validated_gist::{{closure}}
 0.2%   0.6% 23.4KiB  stackmuncher_lib stackmuncher_lib::processors::process_file::{{closure}}
 0.2%   0.5% 19.8KiB stackmuncher_lib? <stackmuncher_lib::report::_::<impl serde::de::Deserialize for stackmuncher_li...
 0.2%   0.5% 19.5KiB              http http::header::name::parse_hdr
28.9%  90.7%  3.6MiB                   And 10608 smaller methods. Use -n N to show more.
31.8% 100.0%  4.0MiB                   .text section size, the file size is 12.5MiB

Experiments

--target x86_64-unknown-linux-gnu

  • Unoptimized: 13,064,240
  • Unoptimized, stripped: 6,770,992
  • lto = true: 9,785,224
  • lto = true, stripped: 5,972,216
  • lto = true, codegen-units = 1: 9,298,080
  • lto = true, codegen-units, stripped : 5,652,704

rimutaka avatar Aug 30 '21 10:08 rimutaka