Bug 12761 - Startup slow uses 5GB memory
Summary: Startup slow uses 5GB memory
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: NUnit ()
Version: 4.0.6
Hardware: PC Linux
: Normal normal
Target Milestone: master
Assignee: Mike Krüger
Depends on:
Reported: 2013-06-19 07:55 UTC by Matt
Modified: 2013-08-19 06:03 UTC (History)
2 users (show)

Is this bug a regression?: ---
Last known good build:

Stack trace (552.30 KB, image/jpeg)
2013-07-01 06:38 UTC, Matt

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Matt 2013-06-19 07:55:09 UTC
Description of Problem:

When I start monodevelop, it sits on the splash screen for ~2 minutes, churns the CPU at 100% the whole time, consumes about 5+GB of memory (resident), then eventually starts. 

Steps to reproduce the problem:
1. Start monodevelop.

Actual Results:

As described above

Expected Results:

Faster, less memory consumption.

How often does this happen? 


Additional Information:

This is new. I build MD every couple of weeks from git, and this was introduced around June 4th (building from b1a76cf1dc does not exhibit the problem, building current 8d0f4bc992ed009aca92) does.
Comment 1 Mikayla Hutchinson [MSFT] 2013-06-19 14:23:36 UTC
I'm not seeing this on Mac or Windows. Could you please git bisect to identify the specific revision?
Comment 2 Matt 2013-06-24 10:10:39 UTC
I have not pinned down the commit, however, I learned how to run MD in MD under debug mode. Now I am dangerous. During the slow startup, I paused and invariably the process is stuck in XmlTextReader.cs, it would appear to be reading something for Nunit (based on the call stack), specifically, NUnit.TestPad.Initialize invoked from OnLoadingWorkspaceUserPreferences. Does that help? I will try to get a chance to hone in on the commit, but it takes five minutes for each test, not a great prospect.

Comment 3 Mikayla Hutchinson [MSFT] 2013-06-24 17:56:45 UTC
Maybe some of the recent commits in the Nunit addin have something to do with it: https://github.com/mono/monodevelop/commits/master/main/src/addins/NUnit
Comment 4 Lluis Sanchez 2013-06-25 12:01:07 UTC
Does this happen while XS is loading a solution?
Comment 5 Lluis Sanchez 2013-06-25 12:02:23 UTC
If not, it would help to see the stack trace involving NUnit.TestPad
Comment 6 Matt 2013-07-01 06:37:58 UTC
Sorry, got tied up in some other things. Here is a screen shot of the stack trace. During this long memory consuming startup, if I pause MD (the meta-MD in which the child MD is starting up) this is where it always is, reading Xml. Let me know if any of that is unclear.
Comment 7 Matt 2013-07-01 06:38:53 UTC
Created attachment 4239 [details]
Stack trace

Not sure if there is a way to get a stack trace as text, so I took a screen shot.
Comment 8 Matt 2013-07-01 11:36:51 UTC
I see the same issue when adding references. I add a reference to an existing project and MD consumes all the memory 13GB+ and dies. So now not only are startups slow, I cannot add references to other projects.
Comment 9 Lluis Sanchez 2013-07-01 11:54:25 UTC
The stack trace shows that MD is loading a solution, so maybe you have the "open previous solution" option set in preferences.

Somewhere in the directory from which the solution is being loaded you'll find a folder named "test-results". This folder contains data from old unit tests runs. I'd like to see which files it contains and how big they are. Try moving that folder to another location so that MD doesn't try to load it, and see if that fixes the startup issues.
Comment 10 Matt 2013-07-01 11:59:46 UTC
Lluis, it must have been at the very moment you were typing your reply that I was deleting every file under test-results in the many projects. Some of the files were very large (20+MB). That seems to have made the startup process work. I think this can be closed. Thank you for the help.