Skip to content

rustdoc: reduce DocFragment::indent to u8 - #163221

Draft
lolbinarycat wants to merge 1 commit into
rust-lang:mainfrom
lolbinarycat:rustdoc-DocFragment-compact
Draft

lolbinarycat wants to merge 1 commit into
rust-lang:mainfrom
lolbinarycat:rustdoc-DocFragment-compact

Conversation

@lolbinarycat

Copy link
Copy Markdown
Contributor

Estimating this should save 52kB when documenting libcore, and more for larger libraries. This saves a whole 2 pointers worth per individual doc comment, and only costs not supporting completely absurd amounts of indentation.

@lolbinarycat

Copy link
Copy Markdown
Contributor Author

@bors try @rust-timer queue profiles=doc

@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 Sep 23, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Sep 23, 2026
…try>

rustdoc: reduce DocFragment::indent to u8
@lolbinarycat lolbinarycat added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Sep 23, 2026
@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Sep 23, 2026
@rust-bors

rust-bors Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: a065d2c (a065d2c5f9140ca4becde2e7957b95c3fe5d4866)
Base parent: 9a9d194 (9a9d1946d1e119676b7a6a8a26a264061e61027d)

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (a065d2c): comparison URL.

Overall result: no relevant changes - no action needed

Benchmarking means the PR may be perf-sensitive. Consider adding rollup=never if this change is not fit for rolling up.

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

Instruction count

This perf run didn't have relevant results for this metric.

Max RSS (memory usage)

Results (primary 2.5%, secondary 2.3%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
2.5% [2.2%, 2.7%] 2
Regressions ❌
(secondary)
2.3% [2.0%, 2.6%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.5% [2.2%, 2.7%] 2

Cycles

This perf run didn't have relevant results for this metric.

Binary size

This perf run didn't have relevant results for this metric.

Bootstrap: 489.957s -> 489.243s (-0.15%)
Artifact size: 407.04 MiB -> 406.28 MiB (-0.19%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Sep 23, 2026
@lolbinarycat

Copy link
Copy Markdown
Contributor Author

no idea why making the struct smaller makes memory usage go up. what.

This branch has not been deployed

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

Labels

S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. 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.

3 participants