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

rustdoc: use strategic boxing to shrink clean::Item #129789

Merged
merged 2 commits into from
Sep 10, 2024

Conversation

notriddle
Copy link
Contributor

  • inline_stmt_id is never a cross-crate DefId, so save space by not storing it.
  • Instead of two inner boxes for Item, use one.

@rustbot
Copy link
Collaborator

rustbot commented Aug 30, 2024

r? @GuillaumeGomez

rustbot has assigned @GuillaumeGomez.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@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 Aug 30, 2024
@rustbot
Copy link
Collaborator

rustbot commented Aug 30, 2024

Some changes occurred in src/librustdoc/clean/types.rs

cc @camelid

@notriddle
Copy link
Contributor Author

@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 Aug 30, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 30, 2024
…l, r=<try>

rustdoc: use strategic boxing to shrink `clean::Item`

* `inline_stmt_id` is never a cross-crate DefId, so save space by not storing it.
* Instead of two inner boxes for `Item`, use one.
@bors
Copy link
Contributor

bors commented Aug 30, 2024

⌛ Trying commit a3127ca with merge a28aaf0...

@bors
Copy link
Contributor

bors commented Aug 30, 2024

☀️ Try build successful - checks-actions
Build commit: a28aaf0 (a28aaf07ecdf971595bc212c884de38db3b18082)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (a28aaf0): comparison URL.

Overall result: ❌✅ regressions and improvements - ACTION NEEDED

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 a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
3.3% [3.3%, 3.3%] 1
Regressions ❌
(secondary)
0.9% [0.3%, 8.1%] 20
Improvements ✅
(primary)
-0.5% [-1.0%, -0.3%] 14
Improvements ✅
(secondary)
-0.5% [-0.7%, -0.3%] 20
All ❌✅ (primary) -0.2% [-1.0%, 3.3%] 15

Max RSS (memory usage)

Results (primary -0.3%, secondary -0.5%)

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.8% [0.4%, 1.7%] 22
Regressions ❌
(secondary)
0.7% [0.4%, 1.5%] 17
Improvements ✅
(primary)
-0.8% [-2.9%, -0.4%] 44
Improvements ✅
(secondary)
-0.9% [-2.1%, -0.4%] 59
All ❌✅ (primary) -0.3% [-2.9%, 1.7%] 66

Cycles

Results (primary -0.1%, secondary 0.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.9% [0.4%, 5.2%] 21
Regressions ❌
(secondary)
1.4% [0.4%, 4.9%] 56
Improvements ✅
(primary)
-0.9% [-4.1%, -0.4%] 27
Improvements ✅
(secondary)
-0.9% [-5.2%, -0.4%] 60
All ❌✅ (primary) -0.1% [-4.1%, 5.2%] 48

Binary size

Results (primary 0.9%)

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.9% [0.9%, 0.9%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.9% [0.9%, 0.9%] 1

Bootstrap: 788.226s -> 790.547s (0.29%)
Artifact size: 338.74 MiB -> 338.73 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 Aug 30, 2024
@notriddle
Copy link
Contributor Author

The 3% and 8% "regressions" are both spurious. They must be, because they're compiler profiles and I only changed rustdoc.

Benchmark Profile Scenario % Change Significance Factor
syn-1.0.89 opt full 3.32% 16.59x
deep-vector debug full 8.08% 40.40x

The same can be said for all of the max-rss changes. This, like #128263, is a CPU improvement, even though it's mostly decreasing the size of things.

@GuillaumeGomez
Copy link
Member

Nice work!

@GuillaumeGomez
Copy link
Member

@bors r+ rollup=iffy

@bors
Copy link
Contributor

bors commented Aug 31, 2024

📌 Commit a3127ca has been approved by GuillaumeGomez

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 Aug 31, 2024
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Sep 2, 2024
…cal, r=GuillaumeGomez

rustdoc: use strategic boxing to shrink `clean::Item`

* `inline_stmt_id` is never a cross-crate DefId, so save space by not storing it.
* Instead of two inner boxes for `Item`, use one.
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 3, 2024
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#101339 (enable -Zrandomize-layout in debug CI builds )
 - rust-lang#127021 (Add target support for RTEMS Arm)
 - rust-lang#127692 (Suggest `impl Trait` for References to Bare Trait in Function Header)
 - rust-lang#128701 (Don't Suggest Labeling `const` and `unsafe` Blocks )
 - rust-lang#128871 (bypass linker configuration and cross target check for specific commands)
 - rust-lang#129624 (Adjust `memchr` pinning and run `cargo update`)
 - rust-lang#129706 (Rename dump of coroutine by-move-body to be more consistent, fix ICE in dump_mir)
 - rust-lang#129789 (rustdoc: use strategic boxing to shrink `clean::Item`)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 5, 2024
…iaskrgr

Rollup of 10 pull requests

Successful merges:

 - rust-lang#101339 (enable -Zrandomize-layout in debug CI builds )
 - rust-lang#120736 (rustdoc: add header map to the table of contents)
 - rust-lang#127021 (Add target support for RTEMS Arm)
 - rust-lang#128928 (CI: rfl: add more tools and steps)
 - rust-lang#129584 (warn the user if the upstream master branch is old)
 - rust-lang#129664 (Arbitrary self types v2: pointers feature gate.)
 - rust-lang#129752 (Make supertrait and implied predicates queries defaulted)
 - rust-lang#129918 (Update docs of `missing_abi` lint)
 - rust-lang#129919 (Stabilize `waker_getters`)
 - rust-lang#129925 (remove deprecated option `rust.split-debuginfo`)

Failed merges:

 - rust-lang#129789 (rustdoc: use strategic boxing to shrink `clean::Item`)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 5, 2024
…iaskrgr

Rollup of 10 pull requests

Successful merges:

 - rust-lang#101339 (enable -Zrandomize-layout in debug CI builds )
 - rust-lang#120736 (rustdoc: add header map to the table of contents)
 - rust-lang#127021 (Add target support for RTEMS Arm)
 - rust-lang#128928 (CI: rfl: add more tools and steps)
 - rust-lang#129584 (warn the user if the upstream master branch is old)
 - rust-lang#129664 (Arbitrary self types v2: pointers feature gate.)
 - rust-lang#129752 (Make supertrait and implied predicates queries defaulted)
 - rust-lang#129918 (Update docs of `missing_abi` lint)
 - rust-lang#129919 (Stabilize `waker_getters`)
 - rust-lang#129925 (remove deprecated option `rust.split-debuginfo`)

Failed merges:

 - rust-lang#129789 (rustdoc: use strategic boxing to shrink `clean::Item`)

r? `@ghost`
`@rustbot` modify labels: rollup
@notriddle
Copy link
Contributor Author

@bors r=GuillaumeGomez

@bors
Copy link
Contributor

bors commented Sep 8, 2024

📌 Commit 6590336 has been approved by GuillaumeGomez

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Sep 8, 2024

⌛ Testing commit 6590336 with merge b36b9af...

bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 8, 2024
…l, r=GuillaumeGomez

rustdoc: use strategic boxing to shrink `clean::Item`

* `inline_stmt_id` is never a cross-crate DefId, so save space by not storing it.
* Instead of two inner boxes for `Item`, use one.
@rust-log-analyzer
Copy link
Collaborator

The job x86_64-msvc-ext2 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
[RUSTC-TIMING] miri test:false 4.488
error: failed to remove file `C:\a\rust\rust\build\x86_64-pc-windows-msvc\stage1-tools\x86_64-pc-windows-msvc\release\miri.exe`

Caused by:
  Access is denied. (os error 5)
Command has failed. Rerun with -v to see more details.
  local time: Sun, Sep  8, 2024 11:37:04 PM
  network time: Sun, 08 Sep 2024 23:37:04 GMT
##[error]Process completed with exit code 1.
Post job cleanup.

@bors
Copy link
Contributor

bors commented Sep 8, 2024

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Sep 8, 2024
@notriddle
Copy link
Contributor Author

@bors retry #127883

@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 Sep 9, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 9, 2024
…l, r=GuillaumeGomez

rustdoc: use strategic boxing to shrink `clean::Item`

* `inline_stmt_id` is never a cross-crate DefId, so save space by not storing it.
* Instead of two inner boxes for `Item`, use one.
@bors
Copy link
Contributor

bors commented Sep 9, 2024

⌛ Testing commit 6590336 with merge 32544e3...

@rust-log-analyzer
Copy link
Collaborator

The job x86_64-msvc-ext2 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
[RUSTC-TIMING] miri test:false 5.074
error: failed to remove file `C:\a\rust\rust\build\x86_64-pc-windows-msvc\stage1-tools\x86_64-pc-windows-msvc\release\miri.exe`

Caused by:
  Access is denied. (os error 5)
Command has failed. Rerun with -v to see more details.
  local time: Mon, Sep  9, 2024  3:27:31 AM
  network time: Mon, 09 Sep 2024 03:27:31 GMT
##[error]Process completed with exit code 1.
Post job cleanup.

@bors
Copy link
Contributor

bors commented Sep 9, 2024

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Sep 9, 2024
@notriddle
Copy link
Contributor Author

@bors retry

@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 Sep 9, 2024
@bors
Copy link
Contributor

bors commented Sep 9, 2024

⌛ Testing commit 6590336 with merge 712463d...

@bors
Copy link
Contributor

bors commented Sep 10, 2024

☀️ Test successful - checks-actions
Approved by: GuillaumeGomez
Pushing 712463d to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Sep 10, 2024
@bors bors merged commit 712463d into rust-lang:master Sep 10, 2024
7 checks passed
@rustbot rustbot added this to the 1.83.0 milestone Sep 10, 2024
@notriddle notriddle deleted the notriddle/inline-stmt-local branch September 10, 2024 01:40
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (712463d): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.5% [-1.0%, -0.2%] 15
Improvements ✅
(secondary)
-0.5% [-0.6%, -0.3%] 19
All ❌✅ (primary) -0.5% [-1.0%, -0.2%] 15

Max RSS (memory usage)

Results (secondary 3.6%)

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.6% [3.2%, 4.0%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

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: 757.468s -> 757.734s (0.04%)
Artifact size: 341.12 MiB -> 341.11 MiB (-0.00%)

@rustbot rustbot removed the perf-regression Performance regression. label Sep 10, 2024
@jieyouxu jieyouxu added the CI-spurious-fail-msvc CI spurious failure: target env msvc label Oct 15, 2024
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 CI-spurious-fail-msvc CI spurious failure: target env msvc 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