Skip to content

Don't serialize ExpnData for foreign crates #75137

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

Merged
merged 2 commits into from
Aug 9, 2020

Conversation

Aaron1011
Copy link
Member

When we encode an ExpnId into the crate metadata, we write out the
CrateNum of the crate that 'owns' the corresponding ExpnData, which
is later used to decode the ExpnData from its owning crate.

However, we current serialize the ExpnData for all ExpnIds that we
serialize, even if the ExpnData was already serialized into a foreign
crate. This commit skips encoding this kind of ExpnData, which should
hopefully speed up metadata encoding and reduce the total metadata size.

When we encode an ExpnId into the crate metadata, we write out the
CrateNum of the crate that 'owns' the corresponding `ExpnData`, which
is later used to decode the `ExpnData` from its owning crate.

However, we current serialize the `ExpnData` for all `ExpnIds` that we
serialize, even if the `ExpnData` was already serialized into a foreign
crate. This commit skips encoding this kind of `ExpnData`, which should
hopefully speed up metadata encoding and reduce the total metadata size.
@rust-highfive
Copy link
Contributor

r? @varkor

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 4, 2020
@Aaron1011
Copy link
Member Author

@bors try @rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion

@bors
Copy link
Collaborator

bors commented Aug 4, 2020

⌛ Trying commit 955aebf with merge ff53b385efadfa63cfbf4e38c45243f95886d9cd...

@petrochenkov
Copy link
Contributor

r? @petrochenkov

@rust-highfive rust-highfive assigned petrochenkov and unassigned varkor Aug 4, 2020
@bors
Copy link
Collaborator

bors commented Aug 4, 2020

☀️ Try build successful - checks-actions, checks-azure
Build commit: ff53b385efadfa63cfbf4e38c45243f95886d9cd (ff53b385efadfa63cfbf4e38c45243f95886d9cd)

@rust-timer
Copy link
Collaborator

Queued ff53b385efadfa63cfbf4e38c45243f95886d9cd with parent 40857b9, future comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking try commit (ff53b385efadfa63cfbf4e38c45243f95886d9cd): comparison url.

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. Please note that if the perf results are neutral, you should likely undo the rollup=never given below by specifying rollup- to bors.

Importantly, though, if the results of this run are non-neutral do not roll this PR up -- it will mask other regressions or improvements in the roll up.

@bors rollup=never

@petrochenkov petrochenkov added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 9, 2020
@Aaron1011 Aaron1011 added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 9, 2020
@petrochenkov
Copy link
Contributor

@bors r+

@bors
Copy link
Collaborator

bors commented Aug 9, 2020

📌 Commit ef49032 has been approved by petrochenkov

@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 9, 2020
@bors
Copy link
Collaborator

bors commented Aug 9, 2020

⌛ Testing commit ef49032 with merge 39e593a...

@bors
Copy link
Collaborator

bors commented Aug 9, 2020

☀️ Test successful - checks-actions, checks-azure
Approved by: petrochenkov
Pushing 39e593a to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Aug 9, 2020
@bors bors merged commit 39e593a into rust-lang:master Aug 9, 2020
@cuviper cuviper added this to the 1.47.0 milestone May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants