Skip to content
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

Stop cloning Context so much #133345

Merged
merged 8 commits into from
Dec 2, 2024
Merged

Conversation

GuillaumeGomez
Copy link
Member

This is a first step for #82381.

It's already big enough so I'll continue in a follow-up once this PR is merged. Next step will be to get rid of SharedContext by inlining it directly into Context.

cc @camelid
r? @notriddle

@rustbot rustbot added A-rustdoc-json Area: Rustdoc JSON backend S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Nov 22, 2024
@GuillaumeGomez
Copy link
Member Author

Also very curious about the perf impact.

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Nov 22, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 22, 2024
… r=<try>

Stop cloning `Context` so much

This is a first step for rust-lang#82381.

It's already big enough so I'll continue in a follow-up once this PR is merged. Next step will be to get rid of `SharedContext` by inlining it directly into `Context`.

cc `@camelid`
r? `@notriddle`
@bors
Copy link
Contributor

bors commented Nov 22, 2024

⌛ Trying commit 61a6981 with merge 3a9444a...

@bors
Copy link
Contributor

bors commented Nov 22, 2024

☀️ Try build successful - checks-actions
Build commit: 3a9444a (3a9444aa5f3108eec68c9b7a7e02857ae9ea2ef6)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (3a9444a): comparison URL.

Overall result: ❌ regressions - please read the text below

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-perf +perf-regression

Instruction count

This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

mean range count
Regressions ❌
(primary)
0.6% [0.1%, 1.9%] 5
Regressions ❌
(secondary)
1.5% [1.5%, 1.5%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.6% [0.1%, 1.9%] 5

Max RSS (memory usage)

Results (primary -2.9%, secondary 3.1%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
3.1% [3.0%, 3.2%] 2
Improvements ✅
(primary)
-2.9% [-3.3%, -2.1%] 4
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -2.9% [-3.3%, -2.1%] 4

Cycles

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

Binary size

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

Bootstrap: 794.896s -> 795.389s (0.06%)
Artifact size: 336.03 MiB -> 336.03 MiB (0.00%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Nov 22, 2024
@GuillaumeGomez
Copy link
Member Author

Interesting. Didn't expect the result to be this bad...

@GuillaumeGomez
Copy link
Member Author

Let's see how it goes with this change.

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Nov 23, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 23, 2024
… r=<try>

Stop cloning `Context` so much

This is a first step for rust-lang#82381.

It's already big enough so I'll continue in a follow-up once this PR is merged. Next step will be to get rid of `SharedContext` by inlining it directly into `Context`.

cc `@camelid`
r? `@notriddle`
@bors
Copy link
Contributor

bors commented Nov 23, 2024

⌛ Trying commit c4c6cb2 with merge b1e9070...

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Nov 23, 2024

☀️ Try build successful - checks-actions
Build commit: b1e9070 (b1e9070f079492bda056ba2876ddde884042f3c5)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (b1e9070): comparison URL.

Overall result: ❌✅ regressions and improvements - please read the text below

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-perf +perf-regression

Instruction count

This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

mean range count
Regressions ❌
(primary)
0.2% [0.2%, 0.2%] 1
Regressions ❌
(secondary)
0.4% [0.4%, 0.4%] 1
Improvements ✅
(primary)
-0.5% [-0.5%, -0.5%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.2% [-0.5%, 0.2%] 2

Max RSS (memory usage)

Results (primary -3.3%, secondary -1.7%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-3.3% [-3.4%, -3.2%] 2
Improvements ✅
(secondary)
-1.7% [-1.7%, -1.7%] 1
All ❌✅ (primary) -3.3% [-3.4%, -3.2%] 2

Cycles

Results (secondary 10.2%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
10.2% [10.2%, 10.2%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 796.567s -> 794.663s (-0.24%)
Artifact size: 336.13 MiB -> 336.12 MiB (-0.00%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Nov 23, 2024
@GuillaumeGomez
Copy link
Member Author

Now let's see when we clone the ID map instead of keeping both maps split.

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Nov 23, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 23, 2024
… r=<try>

Stop cloning `Context` so much

This is a first step for rust-lang#82381.

It's already big enough so I'll continue in a follow-up once this PR is merged. Next step will be to get rid of `SharedContext` by inlining it directly into `Context`.

cc `@camelid`
r? `@notriddle`
@bors bors added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 1, 2024
@GuillaumeGomez
Copy link
Member Author

That doesn't seem related to this PR. Gonna wait a bit before rebasing and re-r+ing it.

@GuillaumeGomez
Copy link
Member Author

Let's try again.

@bors r=notriddle,aDotInTheVoid

@bors
Copy link
Contributor

bors commented Dec 1, 2024

📌 Commit 69ed026 has been approved by notriddle,aDotInTheVoid

It is now in the queue for this repository.

@bors 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 Dec 1, 2024
@bors
Copy link
Contributor

bors commented Dec 1, 2024

⌛ Testing commit 69ed026 with merge a522d78...

@bors
Copy link
Contributor

bors commented Dec 2, 2024

☀️ Test successful - checks-actions
Approved by: notriddle,aDotInTheVoid
Pushing a522d78 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Dec 2, 2024
@bors bors merged commit a522d78 into rust-lang:master Dec 2, 2024
7 checks passed
@rustbot rustbot added this to the 1.85.0 milestone Dec 2, 2024
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (a522d78): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

Instruction count

This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.5% [-1.3%, -0.1%] 5
Improvements ✅
(secondary)
-0.8% [-0.8%, -0.8%] 1
All ❌✅ (primary) -0.5% [-1.3%, -0.1%] 5

Max RSS (memory usage)

Results (primary -3.0%, secondary -3.2%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-3.0% [-3.1%, -2.8%] 2
Improvements ✅
(secondary)
-3.2% [-4.5%, -2.3%] 3
All ❌✅ (primary) -3.0% [-3.1%, -2.8%] 2

Cycles

Results (primary -1.7%, secondary -4.8%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-1.7% [-2.2%, -1.4%] 3
Improvements ✅
(secondary)
-4.8% [-4.8%, -4.8%] 1
All ❌✅ (primary) -1.7% [-2.2%, -1.4%] 3

Binary size

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

Bootstrap: 768.518s -> 768.623s (0.01%)
Artifact size: 332.12 MiB -> 332.16 MiB (0.01%)

@GuillaumeGomez GuillaumeGomez deleted the stop-cloning-context branch December 2, 2024 09:55
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 2, 2024
…<try>

Remove static HashSet for default IDs list

Follow-up of rust-lang#133345.

Let's see how it impacts performance.

r? `@notriddle`
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Dec 2, 2024
…r=notriddle

Remove static HashSet for default IDs list

Follow-up of rust-lang#133345.

Let's see how it impacts performance.

r? `@notriddle`
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Dec 2, 2024
Rollup merge of rust-lang#133745 - GuillaumeGomez:default-ids-match, r=notriddle

Remove static HashSet for default IDs list

Follow-up of rust-lang#133345.

Let's see how it impacts performance.

r? `@notriddle`
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Dec 4, 2024
…omez

rustdoc: Rename `set_back_info` to `restore_module_data`.

Follow-up to rust-lang#133345, r? `@GuillaumeGomez`

Most of the references to `info` got removed as it was clear that `module_data` makes more sense here. Makes it clearer that `save_module_data` and `restore_module_data` are a pair.
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Dec 4, 2024
Rollup merge of rust-lang#133764 - aDotInTheVoid:rename, r=GuillaumeGomez

rustdoc: Rename `set_back_info` to `restore_module_data`.

Follow-up to rust-lang#133345, r? `@GuillaumeGomez`

Most of the references to `info` got removed as it was clear that `module_data` makes more sense here. Makes it clearer that `save_module_data` and `restore_module_data` are a pair.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rustdoc-json Area: Rustdoc JSON backend 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
Development

Successfully merging this pull request may close these issues.

7 participants