Uh oh!
There was an error while loading. Please reload this page.
rmeta: avoid embedding StabilityLevel::Unstable reason multiple times into .rmeta\.rlib files - #98770
Conversation
rust-highfive
commented
Jul 1, 2022
r? @lcnr (rust-highfive has picked a reviewer for you, use r? to override) |
klensy
commented
Jul 1, 2022
Or maybe encode with something like this, but values deduped? rust/compiler/rustc_metadata/src/rmeta/mod.rs Lines 126 to 135 in ca1e68b |
cjgillot
commented
Jul 2, 2022
There is precedent for such encoding, for instance |
klensy
commented
Jul 2, 2022
from #88180 when issue was created: |
klensy
commented
Jul 2, 2022
Checked now, for stage0 compiler artifact libobject.rmeta: 11237 times, for example. |
cjgillot
commented
Jul 2, 2022
Why not the following:
This would maximize the deduplication while being self-contained. What do you think? |
klensy
commented
Jul 2, 2022
rust/compiler/rustc_span/src/symbol.rs Lines 1822 to 1833 in aedf78e Something like replacing |
cjgillot
commented
Jul 2, 2022
To generate those hash-tables, you can use specialization like we do for |
lcnr
commented
Jul 4, 2022
r? @cjgillot |
cjgillot
commented
Jul 11, 2022
bors
commented
Jul 14, 2022
☔ The latest upstream changes (presumably #98975) made this pull request unmergeable. Please resolve the merge conflicts. |
klensy
commented
Jul 19, 2022
I think this should be merged (and #98851 tested after that), as current default error message looks more like lint warn\error (that can possibly be translatable in future) and shouldn't be embed into compiled artifacts, will rebase. |
1cc712d to
b38c948Compareklensy
commented
Jul 24, 2022
@rustbot ready |
cjgillot
commented
Jul 24, 2022
@bors r+ rollup=never |
bors
commented
Jul 24, 2022
bors
commented
Jul 25, 2022
bors
commented
Jul 25, 2022
☀️ Test successful - checks-actions |
rust-timer
commented
Jul 25, 2022
Finished benchmarking commit (7f93d4a): comparison url. Instruction count
Max RSS (memory usage)Results
CyclesResults
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression Footnotes |
Avoids bloating size of some rmeta\rlib files by not placing default string for
StabilityLevel::Unstablereason multiple times, affects only stdlib\rustc artifacts. For stdlib cuts about 3% (diff of total size for patched\unpatched *.rmeta files of stage1-std) of file size, depending on crates.fixes#88180