rustdoc: use a more compact encoding for implementors/trait.*.js
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 for Clone it went from 64K to 44K.
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)
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
:hourglass: Trying commit 513cf8664ab074d0fa540f1e1661193aeff0d358 with merge 0c2c82bf492f1dcb836c5bb4c4c3226aeaee389a...
:sunny: Try build successful - checks-actions
Build commit: 0c2c82bf492f1dcb836c5bb4c4c3226aeaee389a (0c2c82bf492f1dcb836c5bb4c4c3226aeaee389a)
Queued 0c2c82bf492f1dcb836c5bb4c4c3226aeaee389a with parent cdfd675a63090182fd1c5f2ff58d8eaa115da156, future comparison URL.
Finished benchmarking commit (0c2c82bf492f1dcb836c5bb4c4c3226aeaee389a): comparison url.
Instruction count
- Primary benchmarks: πΏ relevant regressions found
- Secondary benchmarks: πΏ relevant regression found
| mean[^1] | max | count[^2] | |
|---|---|---|---|
| Regressions πΏ (primary) |
0.6% | 0.7% | 6 |
| Regressions πΏ (secondary) |
0.6% | 0.6% | 1 |
| Improvements π (primary) |
N/A | N/A | 0 |
| Improvements π (secondary) |
N/A | N/A | 0 |
| All πΏπ (primary) | 0.6% | 0.7% | 6 |
Max RSS (memory usage)
Results
- Primary benchmarks: no relevant changes found
- Secondary benchmarks: π relevant improvement found
| mean[^1] | max | count[^2] | |
|---|---|---|---|
| Regressions πΏ (primary) |
N/A | N/A | 0 |
| Regressions πΏ (secondary) |
N/A | N/A | 0 |
| Improvements π (primary) |
N/A | N/A | 0 |
| Improvements π (secondary) |
-2.3% | -2.3% | 1 |
| All πΏπ (primary) | N/A | N/A | 0 |
Cycles
Results
- Primary benchmarks: πΏ relevant regression found
- Secondary benchmarks: mixed results
| mean[^1] | max | count[^2] | |
|---|---|---|---|
| Regressions πΏ (primary) |
2.8% | 2.8% | 1 |
| Regressions πΏ (secondary) |
3.9% | 3.9% | 1 |
| Improvements π (primary) |
N/A | N/A | 0 |
| Improvements π (secondary) |
-4.1% | -4.1% | 1 |
| All πΏπ (primary) | 2.8% | 2.8% | 1 |
[^1]: the arithmetic mean of the percent change [^2]: number of relevant changes
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 @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please fix the regressions and do another perf run. If the next run shows neutral or positive results, the label will be automatically removed.
@bors rollup=never @rustbot label: +S-waiting-on-review -S-waiting-on-perf +perf-regression
The perf impact seems real, probably because of copying Strings around more than necessary. Let's see if using display_fn to write directly to the buffer helps.
@bors try @rust-timer queue
Awaiting bors try build completion.
@rustbot label: +S-waiting-on-perf
:hourglass: Trying commit dddc2fd6de3db11eeeb244e0ac5754c49f9ad11b with merge 10f0d312ef4ea28b6ac22029ff3b9317f55830db...
:sunny: Try build successful - checks-actions
Build commit: 10f0d312ef4ea28b6ac22029ff3b9317f55830db (10f0d312ef4ea28b6ac22029ff3b9317f55830db)
Queued 10f0d312ef4ea28b6ac22029ff3b9317f55830db with parent d77da9da84fc89908ad01578c33c2dca8f597ffe, future comparison URL.
Finished benchmarking commit (10f0d312ef4ea28b6ac22029ff3b9317f55830db): comparison url.
Instruction count
- Primary benchmarks: πΏ relevant regressions found
- Secondary benchmarks: πΏ relevant regressions found
| mean[^1] | max | count[^2] | |
|---|---|---|---|
| Regressions πΏ (primary) |
0.6% | 1.1% | 9 |
| Regressions πΏ (secondary) |
0.5% | 0.8% | 2 |
| Improvements π (primary) |
N/A | N/A | 0 |
| Improvements π (secondary) |
N/A | N/A | 0 |
| All πΏπ (primary) | 0.6% | 1.1% | 9 |
Max RSS (memory usage)
Results
- Primary benchmarks: no relevant changes found
- Secondary benchmarks: π relevant improvement found
| mean[^1] | max | count[^2] | |
|---|---|---|---|
| Regressions πΏ (primary) |
N/A | N/A | 0 |
| Regressions πΏ (secondary) |
N/A | N/A | 0 |
| Improvements π (primary) |
N/A | N/A | 0 |
| Improvements π (secondary) |
-2.3% | -2.3% | 1 |
| All πΏπ (primary) | N/A | N/A | 0 |
Cycles
Results
- Primary benchmarks: no relevant changes found
- Secondary benchmarks: π relevant improvements found
| mean[^1] | max | count[^2] | |
|---|---|---|---|
| Regressions πΏ (primary) |
N/A | N/A | 0 |
| Regressions πΏ (secondary) |
N/A | N/A | 0 |
| Improvements π (primary) |
N/A | N/A | 0 |
| Improvements π (secondary) |
-2.5% | -2.6% | 2 |
| All πΏπ (primary) | N/A | N/A | 0 |
[^1]: the arithmetic mean of the percent change [^2]: number of relevant changes
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 @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please fix the regressions and do another perf run. If the next run shows neutral or positive results, the label will be automatically removed.
@bors rollup=never @rustbot label: +S-waiting-on-review -S-waiting-on-perf +perf-regression
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
:hourglass: Trying commit fc31fce670ad76db14044a519a15870347253766 with merge 99be0b6d211c5348e69332d895ff73bbcee3d9f1...
:sunny: Try build successful - checks-actions
Build commit: 99be0b6d211c5348e69332d895ff73bbcee3d9f1 (99be0b6d211c5348e69332d895ff73bbcee3d9f1)
Queued 99be0b6d211c5348e69332d895ff73bbcee3d9f1 with parent affe0d3a00e92fa7885e3f5d2c5073fde432d154, future comparison URL.
Finished benchmarking commit (99be0b6d211c5348e69332d895ff73bbcee3d9f1): comparison url.
Instruction count
This benchmark run did not return any relevant results for this metric.
Max RSS (memory usage)
Results
- Primary benchmarks: mixed results
- Secondary benchmarks: mixed results
| mean[^1] | max | count[^2] | |
|---|---|---|---|
| Regressions πΏ (primary) |
2.1% | 2.1% | 1 |
| Regressions πΏ (secondary) |
2.2% | 2.2% | 1 |
| Improvements π (primary) |
-1.9% | -1.9% | 1 |
| Improvements π (secondary) |
-2.7% | -2.7% | 1 |
| All πΏπ (primary) | 0.1% | 2.1% | 2 |
Cycles
Results
- Primary benchmarks: πΏ relevant regressions found
- Secondary benchmarks: πΏ relevant regression found
| mean[^1] | max | count[^2] | |
|---|---|---|---|
| Regressions πΏ (primary) |
2.4% | 2.4% | 2 |
| Regressions πΏ (secondary) |
3.0% | 3.0% | 1 |
| Improvements π (primary) |
N/A | N/A | 0 |
| Improvements π (secondary) |
N/A | N/A | 0 |
| All πΏπ (primary) | 2.4% | 2.4% | 2 |
[^1]: the arithmetic mean of the percent change [^2]: number of relevant changes
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 @rustbot label: +S-waiting-on-review -S-waiting-on-perf -perf-regression
Congrats for the perf fix, this is really awesome!
@bors r+
:pushpin: Commit fc31fce670ad76db14044a519a15870347253766 has been approved by GuillaumeGomez
It is now in the queue for this repository.
:hourglass: Testing commit fc31fce670ad76db14044a519a15870347253766 with merge 34a6cae28e7013ff0e640026a8e46f315426829d...
:sunny: Test successful - checks-actions Approved by: GuillaumeGomez Pushing 34a6cae28e7013ff0e640026a8e46f315426829d to master...
Finished benchmarking commit (34a6cae28e7013ff0e640026a8e46f315426829d): comparison url.
Instruction count
- Primary benchmarks: no relevant changes found
- Secondary benchmarks: β relevant improvement found
| mean[^1] | max | count[^2] | |
|---|---|---|---|
| Regressions β (primary) |
N/A | N/A | 0 |
| Regressions β (secondary) |
N/A | N/A | 0 |
| Improvements β
(primary) |
N/A | N/A | 0 |
| Improvements β
(secondary) |
-1.5% | -1.5% | 1 |
| All ββ (primary) | N/A | N/A | 0 |
Max RSS (memory usage)
Results
- Primary benchmarks: no relevant changes found
- Secondary benchmarks: β relevant improvements found
| mean[^1] | max | count[^2] | |
|---|---|---|---|
| Regressions β (primary) |
N/A | N/A | 0 |
| Regressions β (secondary) |
N/A | N/A | 0 |
| Improvements β
(primary) |
N/A | N/A | 0 |
| Improvements β
(secondary) |
-2.6% | -5.4% | 53 |
| All ββ (primary) | N/A | N/A | 0 |
Cycles
Results
- Primary benchmarks: no relevant changes found
- Secondary benchmarks: β relevant improvements found
| mean[^1] | max | count[^2] | |
|---|---|---|---|
| Regressions β (primary) |
N/A | N/A | 0 |
| Regressions β (secondary) |
N/A | N/A | 0 |
| Improvements β
(primary) |
N/A | N/A | 0 |
| Improvements β
(secondary) |
-3.4% | -5.4% | 8 |
| All ββ (primary) | N/A | N/A | 0 |
[^1]: the arithmetic mean of the percent change [^2]: number of relevant changes
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.
@rustbot label: -perf-regression