Memory Consumption

Hi folks,

I am using Resharper 8 EAP right now, but this behaviour was also detected in R#7: R# requires a lot of memory. We have a lot of small projects with <=10 Projects but also one very large Solution with ~280 projects. R# often consumes 900MB or more - especially when I had the large solution open.
What really annoys me: I have two VS2012 open. One instance has the large solution loaded. R# needs ~500MB. The other solution has a solution with only 9 projects opn. Required memory: 829MB. It also seems, that allocated memory will be released very slow - Once a large solution was open, the memory seems to stay allocated until I close VS.

Any ideas? What shall I send you?

Solution wide analysis is turned off.

Ciao
Michael

0
5 comments

Hi Michael,

Could you please check what is the 'Managed memory usage' for ReSharper? Option is located in "ReSharper | Options | Environment | General | Show memory usage in status bar"?
Also, what will happen if you double-click the RAM amount to manually collect garbage on it?

Thanks.

0

Hi,

The amounts I have written are the ones which R# displays in the status bar. Carbage collection descreases those numbers a bit - sometimes up to ~100MB, but thats it :(

Ciao
Michael

0

Michael,

Thanks for the info. So, what is the outcome of this memory consumption? Like, is VS is starting to slow down in some scenarios? If so, could you please help us to determine the cause of the issue by profiling Visual Studio for us?


In the ReSharper 7 you may do that straight away with 'ReSharper | Help | Profile Visual Studio'. This action will start the profiling of the VS immediately - after you finish doing the repro actions, please press the 'Get Snapshot' button in the dialog.

After profiling is complete, you 'll be able to upload the snapshot to our FTP server, so we could investigate it to provide a solution and/or bugfix for the performance issues.

Thank you for doing some profiling for us!

0

I don't know if this will help, but I bumped into an OutOfMemory exception while trying to build the solution. This was using Visual Studio 2010 on Windows 7 x64 with a somewhat large website project (say 200 or so *.aspx pages and several *.asmx controls) and 15 or 20 DLL projects.This probably doesn't seem like a lot, but some of these are very monolithic classes with between 50 and 10,000 lines of code and very tight coupling between classes.

In this particular instance, I needed to change the logic in several methods and backtrack to every caller in the call chain. I didn't want ReSharper to just inject a new parameter into the method because I needed to easily find all the callers (and their callers, and their callers, ad nauseum), so I manually added the parameters to these methods. Right on cue, ReSharper's solution-wide analysis flagged errors in all the callers. I don''t know how many methods and classes I ended up changing (except to say that it was way more than it should have been), but one thing I did notice was that the more errors I purposefully caused, the more memory ReSharper used and that this memory was never returned even after a garbage collection. I remember it took several hours to go through all these changes and when I was finally finished, Visual Studio didn't have enough memory to build the solution. I do remember ReSharper was using right around a gig of memory according to the status bar.

0

I forgot to mention that as the memory climbed and the number of errors in the solution increased, ReSharper became very sluggish. I also noticed points in which ReSharper was analyzing some large code files (solution-wide analysis enabled) that I couldn't type for seconds at a time. If I remember correctly, I think this is particularly noticable when openeing a fairly large file and sometimes when solution wide analysis is scanning large files. It just seems there are occasions when code analysis prevents the UI thread from running.

Some other sligghishness in ReSharper that I wish could be fixed:

Ctrl+Enter to quick fix a field name causes ReSharper to re-analyze the current file. I can Alt+PgDn to get to the next item that needs a quick fix, but the quick fix context menu won't pop up until the code analysis completes. This isn't noticable on small code files, but it can be a long delay with large files.

Rename a parameter in a method causes ReSharper scan every class, *.aspx page, *.html page, and *.ascx control for something (I don't remember the exact term used, but it seems like name conflicts?) that has the same character string (this is in the Rename dialog) and then it analyzes much the same set of files in solution-wide analysis.I've never understood why either of these two are necessary because renaming a property doesn't change the signature and should have no effect on any callers. I really don't understand why it scans *.aspx, *.ascx, and *html files in this case. For common names that are used all over the place, this causes ReSharper to scan and analyze thousands of files.

0

Please sign in to leave a comment.