Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Remove scope_auxiliary. #37764

Merged
merged 1 commit into from
Nov 16, 2016
Merged

Conversation

nnethercote
Copy link
Contributor

scope_auxiliary is a big part of the high memory usage in #36799. It's only used for MIR dumping. I have taken a hubristic approach: I have assumed that particular use is unimportant and removed scope_auxiliary and related things. This reduces peak RSS by ~10% for a cut-down version of the program in #36799.

If that assumption is wrong perhaps we can avoid building scope_auxiliary unless MIR dumping is enabled.

This reduces the peak RSS for a cut-down version of the program
in rust-lang#36799 by 10%, from 951MB to 856MB.
@rust-highfive
Copy link
Contributor

r? @nikomatsakis

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

@arielb1
Copy link
Contributor

arielb1 commented Nov 14, 2016

I think we decided we are going to take a different approach on the MIR size thing.

@nikomatsakis
Copy link
Contributor

@arielb1 did we have another use in mind for scope-auxiliary? I think it is not needed (the MIR dumping is, I think, just so that we can see what was being generated).

I had originally thought we would use it for borrowck -- and I still want to do a version of borrowck that uses scopes as a first step. @pnkfelix is supposed to be investigating. However, we had agreed we'd just try to add in the scopes that we actually need -- i.e., those that are targeted by a borrow.

Seems fine to remove what we have (esp. for a 10% win) and come back with a clean-slate approach.

cc @rust-lang/compiler -- thoughts?

@eddyb
Copy link
Member

eddyb commented Nov 15, 2016

I am fine with removing it if MIR borrowck won't use it.

@brson brson added the relnotes Marks issues that should be documented in the release notes of the next release. label Nov 15, 2016
@nikomatsakis
Copy link
Contributor

@bors r+

@bors
Copy link
Collaborator

bors commented Nov 15, 2016

📌 Commit d775570 has been approved by nikomatsakis

@nikomatsakis
Copy link
Contributor

let's do it. we can always put it back.

@bors
Copy link
Collaborator

bors commented Nov 16, 2016

⌛ Testing commit d775570 with merge c19cb9c...

bors added a commit that referenced this pull request Nov 16, 2016
…akis

Remove `scope_auxiliary`.

`scope_auxiliary` is a big part of the high memory usage in #36799. It's only used for MIR dumping. I have taken a hubristic approach: I have assumed that particular use is unimportant and removed `scope_auxiliary` and related things. This reduces peak RSS by ~10% for a cut-down version of the program in #36799.

If that assumption is wrong perhaps we can avoid building `scope_auxiliary` unless MIR dumping is enabled.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
relnotes Marks issues that should be documented in the release notes of the next release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants