Open
Description
This is a special case of #76382. Attributes
is 72 bytes large and used in quite a few places:
This has two downsides:
- Attributes takes up a lot of space in memory, so this bloats memory usage
- It means attributes have to calculated ahead of time, instead of on-demand. In particular, this requires adding a new attrs field whenever
render
needs to look at the attrs of a specificclean
type (Add stability tags to ImportItem. #83900 (comment)).
It would be better to calculate this on-demand, so it uses less memory and doesn't have to be calculated for each and every item.
Metadata
Metadata
Assignees
Labels
Category: PRs that clean code up or issues documenting cleanup.Call for participation: Medium difficulty. Experience needed to fix: Intermediate.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Issue: Problems and improvements with respect to memory usage during compilation.Relevant to the rustdoc team, which will review and decide on the PR/issue.