- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13.9k
Closed
Labels
E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.I-compilememIssue: Problems and improvements with respect to memory usage during compilation.Issue: Problems and improvements with respect to memory usage during compilation.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
Description
Right now, extern_locations is populated like this: https://github.com/rust-lang/rust/blob/d81d7ab203207c4110fbf1919a99345f7e9c1498/src/librustdoc/formats/cache.rs#L158-L171
All of these can be computed on-demand with only the CrateNum, TyCtxt, and extern_html_root_urls. We should do so to avoid doing more work than necessary (and taking up lots of memory).
Mentoring instructions:
- Add functions src_root,name, andlocationtoExternalCrate, using the same implementation that's currently inCache::populate.
- Change all uses of cache.extern_locationto use the functions instead.
- Delete cache.extern_location.
Originally posted by @jyn514 in #84494 (comment)
Metadata
Metadata
Assignees
Labels
E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.I-compilememIssue: Problems and improvements with respect to memory usage during compilation.Issue: Problems and improvements with respect to memory usage during compilation.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.