Memory usage

Hey people,

I've been doing a lot of debuggin' on a project lately to iron out the last few most irritating bugs out of one of the projects I'm working on.

This ofcourse involves a lot of small changes, rebuild, start, test, etc.

After 10 debug runs in a one hour period to test all the different cases my visual studio had reached 900Mb of memory usage and started throuwing Out-Of-Memory errors (Resharper didn't, it did that back in the 201 build) and finally collapsed. Disabling Resharper fixes the problem.

It's quite easy to reproduce on a reasonaly large solution (44MB binary+symbols when compiled). And during the whole process I have the Exceptions - Break on all exceptions truned on (maybe it has something to do with this issue, though I haven't tried).

Jesse

9 comments
Comment actions Permalink

Thank you for the feedback.
Please could you answe a few questions:

1) What ReSharper build are you using?
2) Are you using VS2003 or VS2005?
3) In VS' status bar ReSharper writes the memory usage. Does this usage
increse during the debug? Or you inspect the memory usage via the Task
Manager?

--
Eugene Pasynkov
Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"Jesse Houwing" <no_mail@jetbrains.com> wrote in message
news:16980963.1122982820223.JavaMail.javamailuser@localhost...

Hey people,

>

I've been doing a lot of debuggin' on a project lately to iron out the
last few most irritating bugs out of one of the projects I'm working on.

>

This ofcourse involves a lot of small changes, rebuild, start, test, etc.

>

After 10 debug runs in a one hour period to test all the different cases
my visual studio had reached 900Mb of memory usage and started throuwing
Out-Of-Memory errors (Resharper didn't, it did that back in the 201 build)
and finally collapsed. Disabling Resharper fixes the problem.

>

It's quite easy to reproduce on a reasonaly large solution (44MB
binary+symbols when compiled). And during the whole process I have the
Exceptions - Break on all exceptions truned on (maybe it has something to
do with this issue, though I haven't tried).

>

Jesse



0
Comment actions Permalink

Thank you for the feedback.
Please could you answe a few questions:


Doh! Should have provided this info from the start (sorry).

1) What ReSharper build are you using?


Resharper 2.0 (build 202 & 203)

2) Are you using VS2003 or VS2005?


VS 2003

3) In VS' status bar ReSharper writes the memory
usage. Does this usage
increse during the debug? Or you inspect the memory
usage via the Task
Manager?


I didn't have this option enabled. I will enable it. I see a lare increase through the taskmanager (finaly stops working at 400MB mem, 570MB page)

Hey people,

>

I've been doing a lot of debuggin' on a project

lately to iron out the

last few most irritating bugs out of one of the

projects I'm working on.
>

This ofcourse involves a lot of small changes,

rebuild, start, test, etc.
>

After 10 debug runs in a one hour period to test

all the different cases

my visual studio had reached 900Mb of memory usage

and started throuwing

Out-Of-Memory errors (Resharper didn't, it did that

back in the 201 build)

and finally collapsed. Disabling Resharper fixes

the problem.
>

It's quite easy to reproduce on a reasonaly large

solution (44MB

binary+symbols when compiled). And during the whole

process I have the

Exceptions - Break on all exceptions truned on

(maybe it has something to

do with this issue, though I haven't tried).

>

Jesse



0
Comment actions Permalink

Just some observations:

It seems to be mostly related to highlighting. I've got files that take in excess of 15Mb of extra memory with highlighting enabled. And when debugging I use goto declaration, find usages etc a lot so the number of open files will grow during such session. Especially opening Typed datasets (due to exception traces going into the generated code) are killing (20 to 30 MB per dataset) and cause VS to hang for more than a minute.

On ething I also noticed is that when disabling highlighting, no memory is re-claimed. This seems odd. Closing the file afterwards doesn't reclaim either.

If I have highlighting enabled though at least some memory (could be all, hard to tell) is reclaimed when closing a file.

By simply closing and re-opening documents with highlighting enabled and then disabled memory consumption raises from 58 MB to 110MB in a matter of minutes, sometimes you see the memorymeter drop, but never as much as you see it raise. It could be that you're caching stuff, but that should not cause the system memory to fill up completely.

0
Comment actions Permalink

Did some more testing and with all other VS Add-Ins removed except Resharper I get 700 or more Mb memory usage within 2 hours. Removing Resharper solves this problem completely.

Though the memorymeter at the bottom stays at 120Mb, this value seems to be incomplete. I remember from the DevExpress forums that Coderush suffered from similar problems before, which were related to VS not cleaning up items because they weren't released by Coderush at the right moment. I suspect something very similar could be the problem with Resharper at the moment. For now I'm revering back to 1.5.

0
Comment actions Permalink

Hello Jesse,

the memory usage reported in the status bar is inherently incomplete (if
it is possible to determine what
is complete in such a question at all), since it just shows the value returned
by the GC.GetTotalMemory (false) function.
This does not account for unmanaged memory such as native heap, loaded images
etc. More realistic (and complete) values
are displayed in the task manager.

We'll definitely work on improving memory usage in the nearest future, so
keep in touch!

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

Did some more testing and with all other VS Add-Ins removed except
Resharper I get 700 or more Mb memory usage within 2 hours. Removing
Resharper solves this problem completely.

Though the memorymeter at the bottom stays at 120Mb, this value seems
to be incomplete. I remember from the DevExpress forums that Coderush
suffered from similar problems before, which were related to VS not
cleaning up items because they weren't released by Coderush at the
right moment. I suspect something very similar could be the problem
with Resharper at the moment. For now I'm revering back to 1.5.



0
Comment actions Permalink

I will...

My current project makes it quite easy to get Resharper+VS2003 to load more than 900MB of memory. So it should be easy to test if things have improved.

0
Comment actions Permalink

I'm seeing this with Resharper 1.5 (build 165) aswell, though it takes longer. To reproduce ti I opened all 200 datasets in the application and invoked find usages on the type declaration in order to ee if they were still used (lots of them aren't used anymore, so I removed them from the solution). Every 10 datasets I did a close all open windows from within VS. With highlighting enabled it took a few hours (though longer than the 2.0 EAP) for VS to climb to 900Mb memory usage, which isn't being released.

I've nor disabeld Resharper's highlighting altogether, but that takes away one of the prime functions of Resharper if you ask me. Please make an effort to reduce memory leaks (which this seems to be) and overall memory usage for the next build, without adding new functionality.

Or am I the only person with these kinds of problems?

I've uninstalled all other VS add-ins to make sure it's not any of them causing this issue. After uninstall this still occurred. Normally I run with the following tools installed:
- GhostDoc (1.3)
- ComponentOne (VS integration for Convert to C1Command & WebSpell)
- CodeRush (without refactor)
- Resharper

Slow performance has ever been an issue on my workstation but without Resharper it's a lot more bearable.

System specs:
2GHz P4 (HP small desktop)
512 MB Memory
20GB harddrive with 400Mb left on the c partition and 26 in d: (which is used for resharper caches).
Recently defragmented.

Background processes:
WorkPace 3
McAfee 7 Enterprise Anti Virus

0
Comment actions Permalink

argh... 40GB Harddrive and d has 26GB free.

0
Comment actions Permalink

Just tried 204 with highlighting enabled.

I'm still having problems.

I had to make a change to 40 forms (adding help support to each one by setting the correct help index).

After opening and closing the 20th form VS 2003 had consumed approx 830Mb and had no intention of releasing it.

This is becoming more and more an issue for me. Having to restart VS 2003 in the middle of a refactor job hitting multiple files or durin gextensive code review isn't exactly helping productivity.

Productivity was the reason to install resharper in the first place.

0

Please sign in to leave a comment.