Friday, May 22, 2009

ReSharper 4.5 Memory Consumption

Just tried ReSharper on a fairly large solution with about 38 projects (13 C# and 25 C++). With the ReSharper addin enabled the memory consumption is sitting at about 1.5 GByte for the solution. With the ReSharper addin disabled the memory consumption is sitting at about 300 MByte for the solution. The solution itself has over 90% of its source code in C++ (mix of managed and unmanaged) and only a smaller portion in C#.

JetBrains claim they have worked on the memory consumption of ReSharper 4.5. Looks to me as if more work is needed ....

On my 32 bit box I have to reboot once in a while because I'm running out of memory when the addin is renabled ... (Vista 32 bit, VS 2008, 4 GB RAM)



Update on 04 June 09: It looks as if the memory consumption goes up to the same value with R# disabled. This happens when IntelliSense creates/updates its database. However, with R# disabled the memory drops back to normal once IntelliSense has finished that activity. With R# enabled it appears as if IntelliSense doesn't free up the memory. So it looks as if the problem is caused by the combination of the two. A solution with just C# project (and hence without IntelliSense in C++) doesn't seem to have that issue either.
Since I am in contact with JetBrains at the moment let's see what they can find based on the info I can provide.


Update on 02 February 2010: I had some conversations with JetBrains and they have asked me to provide an example that show the behavior. The challenge is that is seams to happen (or become apparent) only when there is a large number of C++ projects in the solution and the entire C++ code base is significant as well. While I do have an example to demonstrate the behavior, I’m a bit challenged to provide the very example. Would you send your entire code base? At the moment some members of my team have switched off ReSharper when they are working with the solution that also contains C++ projects.


Also check out my blog on Agile Leadership.

6 comments:

YodaMaster said...

Hi!

My name is Kirill and i'm from JetBrains company, R# Team. I have
read your post in your blog related to memory consumption on a mixed
projects. Thank for the using R# ;)
In R#4.5 we have fixed a lot issues related to memory and improved
performance and memory using. But your particular case could be very useful=
for us in that matter,
so we'd appreciate if you could provide us a bit detailed info.
Is it possible to strip your solution down to a small sample that
reproduces the problem. Otherwise if you have a time please attach our
DotTrace profiler and take memory snapshots. We gonna release bug fix
update for R#4.5 so if we could be able to reproduce your case with
memory we will try to fix it ASAP. Thanks a lot for the collaboration.

--
Kirill Falk
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

Anonymous said...
This comment has been removed by a blog administrator.
Manfred said...

Hi Kirill,

thanks for that. I'll contact you directly via email.

Cheers,
Manfred.

Carel Lotz said...

Manfred

Were you able to resolve the issue with the R# folks?

Carel

Manfred said...

Hi Carel,

I sent JetBrain information about my observation. They asked me to send an example, but I'm not in a position to send them the code base of our product and I don't have the time to create a large solution with many C++ projects and code files in it. The problem is not resolved and some members of my team are not able to use R# because of this issue.

The problem seems to be related to large solutions where you have a big proportion of C++ projects. Loading a C++ project Visual Studio refreshes their IntelliSense data. During this process the memory consumption goes up. Without R# the memory is apparently freed when IntelliSense is happy. With R# the memory consumption stays high. I have to further details.

We may be able to use R# on all workstations again once all of them are upgraded from 32 bit to 64 bit and have at least 8 GByte of memory.

It's a bit disappointing from my perspective since generally my perception is that JetBrain's product quality is high.

Manfred.

Anakin said...

The same case here.

We have a solution with 68 projects. 52 of these projects are C++, 2 projects are VB.NET and the rest are C#.

It is taking about 10 minutes to even load the solution (with R# installed), and less than 2 minutes to load the same solution without R#.

Of course that's only the loading part. After the solution has loaded, the memory consumption is way way too much (is R# trying to parse C++? I don't know).

The solution we did was to separate the C# and VB.NET projects to a different solution, then everything seems to works well.

Post a Comment

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