Closed Riduidel closed 8 months ago
seems like I finally found a way to find big dpeendencies/functions : https://github.com/RazrFalcon/cargo-bloat
And result is quite terrible
File .text Size Crate
7.3% 12.8% 889.6KiB reqwest
6.7% 11.9% 826.6KiB std
6.2% 11.0% 764.9KiB tera
2.4% 4.3% 295.8KiB clap
2.3% 4.1% 281.8KiB rustls
1.9% 3.3% 229.7KiB regex
1.9% 3.3% 227.9KiB regex_syntax
1.7% 3.0% 210.0KiB aho_corasick
1.7% 3.0% 207.5KiB h2
1.6% 2.9% 199.5KiB pest
1.4% 2.5% 171.6KiB tokio
1.2% 2.2% 152.8KiB hyper
1.2% 2.1% 143.9KiB lol_html
1.1% 1.9% 133.1KiB flexi_logger
0.9% 1.5% 107.2KiB ring
0.8% 1.5% 104.2KiB atom_syndication
0.7% 1.3% 91.1KiB rss
0.7% 1.2% 83.1KiB globset
0.7% 1.2% 80.6KiB rrss2imap
0.6% 1.1% 76.4KiB encoding_rs
10.6% 18.7% 1.3MiB And 119 more crates. Use -n N to show more.
56.5% 100.0% 6.8MiB .text section size, the file size is 12.0MiB
Wait, I have removed tera and reqwest, so the same now gives
File .text Size Crate
9.6% 14.8% 561.7KiB std
4.7% 7.4% 278.8KiB clap
4.7% 7.3% 275.6KiB rustls
3.9% 6.0% 227.0KiB regex_syntax
3.7% 5.7% 216.4KiB regex
2.8% 4.4% 166.3KiB ureq
2.5% 3.8% 144.9KiB lol_html
2.4% 3.8% 143.5KiB aho_corasick
2.3% 3.6% 136.0KiB flexi_logger
1.8% 2.7% 104.0KiB atom_syndication
1.7% 2.7% 100.5KiB rrss2imap
1.5% 2.4% 89.3KiB rss
1.3% 2.0% 76.4KiB encoding_rs
1.3% 2.0% 74.5KiB imap_proto
1.2% 1.9% 73.1KiB xml
1.2% 1.8% 68.0KiB ring
1.0% 1.5% 57.6KiB toml_edit
0.8% 1.3% 49.8KiB treexml
0.8% 1.3% 48.2KiB serde_json
0.8% 1.2% 46.5KiB rustc_demangle
10.4% 16.2% 613.4KiB And 74 more crates. Use -n N to show more.
64.5% 100.0% 3.7MiB .text section size, the file size is 5.7MiB
Seems like things start to go in a good direction
File .text Size Crate
9.8% 15.0% 565.8KiB std
4.8% 7.4% 279.5KiB clap
4.8% 7.3% 274.7KiB rustls
3.9% 6.0% 227.1KiB regex_syntax
3.7% 5.7% 215.9KiB regex
2.9% 4.4% 167.2KiB ureq
2.5% 3.8% 144.4KiB lol_html
2.5% 3.8% 143.7KiB aho_corasick
2.4% 3.7% 138.2KiB flexi_logger
1.8% 2.8% 104.1KiB atom_syndication
1.6% 2.5% 94.3KiB rrss2imap
1.6% 2.5% 92.9KiB rss
1.3% 2.0% 76.6KiB encoding_rs
1.3% 2.0% 75.2KiB imap_proto
1.3% 1.9% 72.5KiB xml
1.2% 1.8% 68.0KiB ring
1.1% 1.7% 65.7KiB mail_builder
1.0% 1.5% 57.8KiB toml_edit
0.9% 1.3% 49.4KiB treexml
0.8% 1.3% 48.1KiB serde_json
9.8% 15.0% 563.7KiB And 70 more crates. Use -n N to show more.
65.1% 100.0% 3.7MiB .text section size, the file size is 5.6MiB
Note: numbers above are a result of guesswork. They are not 100% correct and never will be.
Seems like #10 fixed also a good part of this
And currently, we have
File .text Size Crate
14.7% 24.6% 629.4KiB std
3.8% 6.3% 161.8KiB rrss2imap
3.7% 6.3% 160.7KiB rustls
3.5% 5.9% 150.9KiB clap
3.2% 5.4% 137.8KiB regex
2.5% 4.1% 106.1KiB aho_corasick
2.4% 4.0% 102.1KiB regex_syntax
1.9% 3.2% 81.4KiB lol_html
1.7% 2.9% 73.8KiB ureq
1.3% 2.3% 57.8KiB rss
1.1% 1.8% 47.2KiB ring
1.1% 1.8% 46.9KiB atom_syndication
1.1% 1.8% 45.8KiB xml
0.9% 1.5% 39.0KiB enum2$<encoding_rs
0.9% 1.5% 37.4KiB imap_proto
0.7% 1.2% 31.3KiB rustc_demangle
0.7% 1.2% 31.1KiB chrono
0.7% 1.2% 30.6KiB flexi_logger
0.6% 1.0% 26.7KiB mail_builder
0.6% 1.0% 24.4KiB selectors
8.8% 14.8% 379.9KiB And 91 more crates. Use -n N to show more.
59.7% 100.0% 2.5MiB .text section size, the file size is 4.2MiB
In fact, I consider this fixed
Usage of tokio was a bad idea : code is way to much complex and should have been refactored prior to introducing async code. So let's do it now :