-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
rustdoc: use a more compact encoding for implementors/trait.*.js #100150
Conversation
Some changes occurred in HTML/CSS/JS. cc @GuillaumeGomez, @Folyd, @jsha |
r? @jsha (rust-highfive has picked a reviewer for you, use r? to override) |
da707ef
to
c7a459c
Compare
The exact amount that this reduces the size of an implementors file depends on whether most of the impls are synthetic or not. For `Send`, it reduces the file from 128K to 116K, while for `Clone` it went from 64K to 52K.
c7a459c
to
513cf86
Compare
Looks good to me but I'm curious about the perf impact so let's check. @bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit 513cf86 with merge 0c2c82bf492f1dcb836c5bb4c4c3226aeaee389a... |
☀️ Try build successful - checks-actions |
Queued 0c2c82bf492f1dcb836c5bb4c4c3226aeaee389a with parent cdfd675, future comparison URL. |
Finished benchmarking commit (0c2c82bf492f1dcb836c5bb4c4c3226aeaee389a): 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. Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @bors rollup=never Footnotes |
The perf impact seems real, probably because of copying Strings around more than necessary. Let's see if using @bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit dddc2fd with merge 10f0d312ef4ea28b6ac22029ff3b9317f55830db... |
☀️ Try build successful - checks-actions |
Queued 10f0d312ef4ea28b6ac22029ff3b9317f55830db with parent d77da9d, future comparison URL. |
Finished benchmarking commit (10f0d312ef4ea28b6ac22029ff3b9317f55830db): 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. Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @bors rollup=never Footnotes |
This means we don't gain as much as we did from using single-quotes, since serde_json can only produce double-quoted strings, but it's still a win.
Last attempt. If it's not all the string copying, it's probably that serde_json is faster at escaping strings than my naive function was. To try this, I can use serde to implement the same format I was using, except that it uses double-quoted strings, so all the double-quotes in the HTML snippets get backslash escaped. An unfortunate loss, but not a huge deal. Getting rid of the unused data in those files still makes this a huge win. @bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit fc31fce with merge 99be0b6d211c5348e69332d895ff73bbcee3d9f1... |
☀️ Try build successful - checks-actions |
Queued 99be0b6d211c5348e69332d895ff73bbcee3d9f1 with parent affe0d3, future comparison URL. |
Finished benchmarking commit (99be0b6d211c5348e69332d895ff73bbcee3d9f1): comparison url. Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results
CyclesResults
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. @bors rollup=never Footnotes |
Congrats for the perf fix, this is really awesome! @bors r+ |
☀️ Test successful - checks-actions |
Finished benchmarking commit (34a6cae): 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 |
The exact amount that this reduces the size of an implementors file depends on whether most of the impls are synthetic or not. For
Send
, it reduces the file from 128K to 112K, while forClone
it went from 64K to 44K.