High Memory Usage on R# 2.5

Has anyone else noticed that R# 2.5 seems to use a lot of memory? I've even had VS crash with an Out of Memory exception yesterday.

I turned on the show memory usage option in R# and noticed at one point yesterday it was using around 600 MB of RAM.

This isn't working on a large project either. It's a solution containing 1 ASP.net project with about 40-50 files, 1 Data Access Layer class library project, and a couple unit tests projects.

Thanks,
Shawn.

11 comments
Comment actions Permalink

Is such high memory usage reproducable only with this particular solution
or also with some other solutions?

Valentin Kipiatkov
CTO and Chief Scientist
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

Has anyone else noticed that R# 2.5 seems to use a lot of memory?
I've even had VS crash with an Out of Memory exception yesterday.

I turned on the show memory usage option in R# and noticed at one
point yesterday it was using around 600 MB of RAM.

This isn't working on a large project either. It's a solution
containing 1 ASP.net project with about 40-50 files, 1 Data Access
Layer class library project, and a couple unit tests projects.

Thanks, Shawn.



0
Comment actions Permalink

I haven't tried yet with other solutions, but I have noticed that there may be a memory leak when switching between HTML and Design view on aspx pages. I was able to switch back and forth between the two views several times over the course of about 20 minutes and saw the memory utilization of R# increase by about 1-2MB per switch.

Closing the aspx page also seemed to increase the memory consumption by about 1MB.

I've only seen the Out of Memory error once so far and that was after working for about 6 hours on the asp.net project.

Thanks,

Shawn.

0
Comment actions Permalink

I haven't tried yet with other solutions, but I have noticed that
there may be a memory leak when switching between HTML and Design view
on aspx pages. I was able to switch back and forth between the two
views several times over the course of about 20 minutes and saw the
memory utilization of R# increase by about 1-2MB per switch.


Are the cooresponding aspx pages big? I could not reproduce it on my examples.
Is that reproducable for you?

Valentin Kipiatkov
CTO and Chief Scientist
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

I haven't tried yet with other solutions, but I have noticed that
there may be a memory leak when switching between HTML and Design view
on aspx pages. I was able to switch back and forth between the two
views several times over the course of about 20 minutes and saw the
memory utilization of R# increase by about 1-2MB per switch.

Closing the aspx page also seemed to increase the memory consumption
by about 1MB.

I've only seen the Out of Memory error once so far and that was after
working for about 6 hours on the asp.net project.

Thanks,

Shawn.



0
Comment actions Permalink

I wouldn't say that the pages are huge. The HTML view has about 377 lines and the code-behind has 100 lines. We are using the 3rd party form validation library Professional Validation and More (http://www.peterblum.com/VAM/) on the page if that makes a difference. Other than PVAM, it's a standard ASP.net 2 page.

I can submit the page source code (it's a survey form) if you provide me with an email to send it to. I would prefer to not upload it to the message boards.

0
Comment actions Permalink

Send it to "valentin at jetbrains.com".

Is it reproducable for you? How exactly? Is it enough to just switch between
design and code views of the same page?

Valentin Kipiatkov
CTO and Chief Scientist
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

I wouldn't say that the pages are huge. The HTML view has about 377
lines and the code-behind has 100 lines. We are using the 3rd party
form validation library Professional Validation and More
(http://www.peterblum.com/VAM/) on the page if that makes a
difference. Other than PVAM, it's a standard ASP.net 2 page.

I can submit the page source code (it's a survey form) if you provide
me with an email to send it to. I would prefer to not upload it to
the message boards.



0
Comment actions Permalink

I've just emailed the source code.

This problem has been fairly reproducable today. Just switching back and forth between HTML and Design view is enough to increase the memory usage of R#.

I have noticed on another page that does not use the Professional Validation and More library that memory usage increases for the first few switches and then the memory is released (i.e. increased to about 200 MB and then dropped to about 85MB). I do not see as much of a memory release on the page using PVAM (though I have seen some).

0
Comment actions Permalink

Hi all

I've seen the same problems. In my case R# gets up to about 350 Megs
compared to the about 80 Megs I noticed before installing V2.5. Just
normal C# library coding here, nothing complicated. The memory seems to
increase quicker if you work on partial classes and also larger classes
make the memory usage go up quicker.

On top of that R# is really really really slow when performing the
analysis and code coloring on large (say over 600 lines) files. In
partial classes it's even worse. Sometimes taking quite a while before
you can move the cursor (even moving the cursor up and down takes time
if the window has to scroll)

I can try to make a repro if you need it.

Regards Patrick

Shawn Smiley wrote:

Has anyone else noticed that R# 2.5 seems to use a lot of memory? I've even had VS crash with an Out of Memory exception yesterday.

I turned on the show memory usage option in R# and noticed at one point yesterday it was using around 600 MB of RAM.

This isn't working on a large project either. It's a solution containing 1 ASP.net project with about 40-50 files, 1 Data Access Layer class library project, and a couple unit tests projects.

Thanks,
Shawn.

0
Comment actions Permalink

I tried it with your example. I can reproduce growing the memory size as
you explained. However, I believe that it's not related to ReSharper. The
memory shown in the statusbar is in fact the size of the .NET virtual machine
heap which is running inside VisualStudio. VisualStudio itself is mainly
a native application but has some managed parts (in particular ASP.NET desigjner,
AFAIK) which also use some memory in the heap. I tried doing the same switch
with ReSharper addin disabled and gives the same growth of the heap size.
To see the heap size without ReSharper enabled, you can use Windows Performance
monitor (Control Panel > Administrative tools > Performance). Select "Add"
on the toolbar, select ".NET CLR Memory" performance object and "#Bytes in
all heaps" counter to watch.

Valentin Kipiatkov
CTO and Chief Scientist
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

I've just emailed the source code.

This problem has been fairly reproducable today. Just switching back
and forth between HTML and Design view is enough to increase the
memory usage of R#.

I have noticed on another page that does not use the Professional
Validation and More library that memory usage increases for the first
few switches and then the memory is released (i.e. increased to about
200 MB and then dropped to about 85MB). I do not see as much of a
memory release on the page using PVAM (though I have seen some).



0
Comment actions Permalink

Hi Valentin

I don't know how Shawns code reacts but I'm pretty sure that the memory
increase I'm seeing is due to resharper alone (probably in the code
coloring, which on second thought may be a VS thing). Before installing
R# 2.5 the memory use was rather low and I could run 3 instances of VS
on my machine but after installing R# 2.5 there is no chance for that.
The memory use has gone up lots and lots. It's a little difficult to
send you the code as there's quite a lot of it and right now I don't
have the time to reduce it to a test case :(
My code has about 100 files in the project and 5 projects in the
solution. 2 of those are test assemblies (which contain is very dense
code which is hard to highlight). When working with the test code
everything is slow. Just moving the cursor up or down takes a long time
at full cpu. I don't know if this is R# or VS.

I have tried to switch off the r# plugin but VS won't let me (go into
the plugin manager and click the automatic load switch and VS will just
turn it back on) so the only way to not load R# is to un-install it and
that's a little to much effort.

I can send you the test code so that you can see if you can track the
problem.

Regards

Petrik

Valentin Kipiatkov (JetBrains) wrote:

I tried it with your example. I can reproduce growing the memory size as
you explained. However, I believe that it's not related to ReSharper.
The memory shown in the statusbar is in fact the size of the .NET
virtual machine heap which is running inside VisualStudio. VisualStudio
itself is mainly a native application but has some managed parts (in
particular ASP.NET desigjner, AFAIK) which also use some memory in the
heap. I tried doing the same switch with ReSharper addin disabled and
gives the same growth of the heap size. To see the heap size without
ReSharper enabled, you can use Windows Performance monitor (Control
Panel > Administrative tools > Performance). Select "Add" on the
toolbar, select ".NET CLR Memory" performance object and "#Bytes in all
heaps" counter to watch.

Valentin Kipiatkov
CTO and Chief Scientist
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

0
Comment actions Permalink

My typical memory usage (as shown in Task Manager) has more than doubled since I installed R#2.5. I wouldn't have noticed it but my colleague who installed at the same time only has 512MB of RAM (I have 2gb), and his VS has been running dog slow due to paging. Just creating a simple WebSite solution in C# is taking up 250MB, and it took only 127MB a couple weeks ago. My current web application project is over 500MB and was under 250 just last week. Resharper memory in the status bar is currently showing 147MB (is that JUST for resharper?) My WAP is several hundred files (about 80 pages) with codebehind (and lots of partial class pages) and about 100 user controls with codebehind.

0
Comment actions Permalink

Hello Brett,

no, the value displayed in the status bar is just the result of the system
GC.GetTotalMemory() call. This accounts for the entire process
managed memory heap, not only for the memory allocated / referenced by ReSharper.


Dmitry Shaporenkov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


Resharper
memory in the status bar is currently showing 147MB (is that JUST for
resharper?) >



0

Please sign in to leave a comment.