Saturday, June 26, 2010

One More: R# Memory Consumption in VS 2010

In my last two posts I wrote about memory consumption of the VS 2010/Resharper 5 combo. In one of the posts I demonstrated how an average of about 10 MBytes of memory are lost each time you close and re-open a solution.

For this post I ran a different experiment. This time I just used R# in VS 2010 for a lengthy period of time without closing/re-opening the solution. The result is plotted in the following graph:

image

The horizontal axis is the commit to the source code repository that I did. I measured the memory usage after each commit. The vertical axis shows the usage of managed memory in MBytes.

As by and large R# is the only addin/extension that uses managed memory it still looks as if R# is “absorbing” this memory. It doesn’t seem look like memory fragmentation but rather like a memory leak. I didn’t run the experiment without R#. It wouldn’t be comparable as I wouldn’t have refactoring available to this degree.

Overall it seems as if version 5 of Resharper still hasn’t resolved the memory problems. Having said that for most project/solution types it should be fine, though.

2 comments:

Ilya Ryzhenkov said...

Consuming memory is not always a leak :) For example, ReSharper loads detailed metadata from assemblies on demand, when there is reference in code.

Also, it very well could be garbage, try to double click memory indicator (this will invoke GC collect) before getting number for graph.

Manfred Lange said...

Yes, I totally agree, Ilya. In Resharper 4.x clicking the GC menu did indeed make a noticable difference. In version 5.0, however, clicking this menu item never made a significant difference in my deployment. I wish it did!

Post a Comment

All comments, questions and other feedback is much appreciated. Thank you!