5

rustdoc: use a more compact encoding for implementors/trait.*.js by notriddle ·...

 2 years ago
source link: https://github.com/rust-lang/rust/pull/100150
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Conversation

Contributor

@notriddle notriddle commented 15 days ago

edited

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.

All reactions

Collaborator

rustbot commented 15 days ago

Some changes occurred in HTML/CSS/JS.

cc @GuillaumeGomez, @Folyd, @jsha

rustbot

added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label

15 days ago

Collaborator

rust-highfive commented 15 days ago

r? @jsha

(rust-highfive has picked a reviewer for you, use r? to override)

rust-highfive

added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label

15 days ago

Looks good to me but I'm curious about the perf impact so let's check.

@bors try @rust-timer queue

Collaborator

rust-timer commented 15 days ago

Awaiting bors try build completion.

@rustbot label: +S-waiting-on-perf

rustbot

added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label

15 days ago

Contributor

bors commented 15 days ago

hourglass Trying commit 513cf86 with merge 0c2c82b...

Contributor

bors commented 15 days ago

sunny Try build successful - checks-actions
Build commit: 0c2c82b (0c2c82bf492f1dcb836c5bb4c4c3226aeaee389a)

Collaborator

rust-timer commented 15 days ago

Collaborator

rust-timer commented 15 days ago

Finished benchmarking commit (0c2c82b): comparison url.

Instruction count

  • Primary benchmarks: crying_cat_face relevant regressions found
  • Secondary benchmarks: crying_cat_face relevant regression found
mean1 max count2
Regressions crying_cat_face
(primary)
0.6% 0.7% 6
Regressions crying_cat_face
(secondary)
0.6% 0.6% 1
Improvements tada
(primary)
N/A N/A 0
Improvements tada
(secondary)
N/A N/A 0
All crying_cat_facetada (primary) 0.6% 0.7% 6

Max RSS (memory usage)

Results

Cycles

Results

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

Footnotes

  1. the arithmetic mean of the percent change

  2. number of relevant changes

rustbot

added perf-regression Performance regressions

and removed S-waiting-on-perf Status: Waiting on a perf run to be completed.

labels

15 days ago

Contributor

Author

notriddle commented 14 days ago

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

Collaborator

rust-timer commented 14 days ago

Awaiting bors try build completion.

@rustbot label: +S-waiting-on-perf

rustbot

added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label

14 days ago

Contributor

bors commented 14 days ago

hourglass Trying commit dddc2fd with merge 10f0d31...

Contributor

bors commented 14 days ago

sunny Try build successful - checks-actions
Build commit: 10f0d31 (10f0d312ef4ea28b6ac22029ff3b9317f55830db)

Collaborator

rust-timer commented 14 days ago

Collaborator

rust-timer commented 14 days ago

Finished benchmarking commit (10f0d31): comparison url.

Instruction count

  • Primary benchmarks: crying_cat_face relevant regressions found
  • Secondary benchmarks: crying_cat_face relevant regressions found
mean1 max count2
Regressions crying_cat_face
(primary)
0.6% 1.1% 9
Regressions crying_cat_face
(secondary)
0.5% 0.8% 2
Improvements tada
(primary)
N/A N/A 0
Improvements tada
(secondary)
N/A N/A 0
All crying_cat_facetada (primary) 0.6% 1.1% 9

Max RSS (memory usage)

Results

Cycles

Results

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

Footnotes

  1. the arithmetic mean of the percent change

  2. number of relevant changes

rustbot

removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label

14 days ago

Contributor

Author

notriddle commented 14 days ago

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

Collaborator

rust-timer commented 14 days ago

Awaiting bors try build completion.

@rustbot label: +S-waiting-on-perf

rustbot

added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label

14 days ago

Contributor

bors commented 14 days ago

hourglass Trying commit fc31fce with merge 99be0b6...

Contributor

bors commented 14 days ago

sunny Try build successful - checks-actions
Build commit: 99be0b6 (99be0b6d211c5348e69332d895ff73bbcee3d9f1)

Collaborator

rust-timer commented 14 days ago

Collaborator

rust-timer commented 14 days ago

Finished benchmarking commit (99be0b6): comparison url.

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results

Cycles

Results

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

Footnotes

  1. the arithmetic mean of the percent change

  2. number of relevant changes

notriddle reacted with hooray emoji All reactions

Congrats for the perf fix, this is really awesome!

@bors r+

Contributor

bors commented 11 days ago

pushpin Commit fc31fce has been approved by GuillaumeGomez

It is now in the queue for this repository.

bors

added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.

labels

11 days ago

Contributor

bors commented 10 days ago

hourglass Testing commit fc31fce with merge 34a6cae...

Contributor

bors commented 10 days ago

sunny Test successful - checks-actions
Approved by: GuillaumeGomez
Pushing 34a6cae to master...

bors

added the merged-by-bors This PR was explicitly merged by bors label

10 days ago

bors

merged commit 34a6cae into

rust-lang:master

10 days ago

11 checks passed

rustbot

added this to the 1.65.0 milestone

10 days ago

notriddle

deleted the notriddle/implementors-js branch

10 days ago

Collaborator

rust-timer commented 10 days ago

Finished benchmarking commit (34a6cae): comparison url.

Instruction count

  • Primary benchmarks: no relevant changes found
  • Secondary benchmarks: white_check_mark relevant improvement found
mean1 max count2
Regressions x
(primary)
N/A N/A 0
Regressions x
(secondary)
N/A N/A 0
Improvements white_check_mark
(primary)
N/A N/A 0
Improvements white_check_mark
(secondary)
-1.5% -1.5% 1
All xwhite_check_mark (primary) N/A N/A 0

Max RSS (memory usage)

Results

Cycles

Results

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

@rustbot label: -perf-regression

Footnotes

  1. the arithmetic mean of the percent change

  2. number of relevant changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels
merged-by-bors This PR was explicitly merged by bors S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects

None yet

Milestone

1.65.0

Development

Successfully merging this pull request may close these issues.

None yet

7 participants

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK