You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue did not exist in rustc 1.19.0-nightly (5f3966864 2017-05-25). Issue does exist in rustc 1.19.0-nightly (557967766 2017-05-26). 5f39668...5579677
Issue is that rustc is suddenly burning through a ton of memory. I had to kill it when it got to around 5GB because I don't want my computer to swap to death.
Some performance testing by removing lines indicates that the time taken and memory used is roughly linear with the number of lines. Approximately 0.1 seconds and 12MB of memory per line.
Interestingly, the issue only occurs when DEFINE_GUID! is imported via #[macro_use(DEFINE_GUID)] extern crate winapi;. If I define the macro locally, then the issue goes away.
ping @pnkfelix -- this seems to be of pretty high importance. I'm not sure whether @jseyfried has time to make progress on it now, maybe you can look into it a bit?
Sorry for the delay getting to this -- I worked on this yesterday and couldn't repro. I tried on a Linux and a Windows system with a couple of recent nightlies. I have some extra time this week, so once I can repro I believe I can investigate and fix within a day.
Activity
retep998 commentedon Jun 8, 2017
Issue did not exist in
rustc 1.19.0-nightly (5f3966864 2017-05-25). Issue does exist inrustc 1.19.0-nightly (557967766 2017-05-26). 5f39668...5579677Issue is that rustc is suddenly burning through a ton of memory. I had to kill it when it got to around 5GB because I don't want my computer to swap to death.
Code that is failing to compile is just a bunch of GUID constants. https://github.com/retep998/winapi-rs/blob/0.2/lib/dxguid/src/lib.rs
Doing the run with
-Ztime-passesI get through the following stages without issueAfter that should come
name resolutionbut instead it just sits around burning up memory.retep998 commentedon Jun 8, 2017
Based on the commits in the commit range, I'm going to accuse @jseyfried of causing this with #40847
retep998 commentedon Jun 8, 2017
Some performance testing by removing lines indicates that the time taken and memory used is roughly linear with the number of lines. Approximately 0.1 seconds and 12MB of memory per line.
retep998 commentedon Jun 8, 2017
Interestingly, the issue only occurs when
DEFINE_GUID!is imported via#[macro_use(DEFINE_GUID)] extern crate winapi;. If I define the macro locally, then the issue goes away.nikomatsakis commentedon Jun 8, 2017
triage: P-high
nikomatsakis commentedon Jun 15, 2017
ping @pnkfelix -- this seems to be of pretty high importance. I'm not sure whether @jseyfried has time to make progress on it now, maybe you can look into it a bit?
jseyfried commentedon Jun 15, 2017
Sorry for the delay getting to this -- I worked on this yesterday and couldn't repro. I tried on a Linux and a Windows system with a couple of recent nightlies. I have some extra time this week, so once I can repro I believe I can investigate and fix within a day.
jseyfried commentedon Jun 15, 2017
Reproduced, working on a fix now.
jseyfried commentedon Jun 18, 2017
Fixed in #42728.
Rollup merge of rust-lang#42728 - jseyfried:fix_resolve_perf, r=nrc
alloc: remove repeated word in comment
Rollup merge of rust-lang#97578 - ojeda:checkpatch, r=JohnTitor
Rollup merge of rust-lang#97578 - ojeda:checkpatch, r=JohnTitor
Rollup merge of rust-lang#97578 - ojeda:checkpatch, r=JohnTitor