Memory Usage

Hello,

I am using Resharper on a fairly large project with about 100 classes and 40-50 winforms. The project also uses Infragistics NetAdvantage and DevExpress WinSuite. When I invoke ReSharper (it's not on by default), the devenv.exe memory usage goes from 30-40 mb to 300-350 MB.

Is this normal? If not, what can I do to alleviate the problem?

Thanks.

9 comments
Comment actions Permalink

Hello frank,

it heavily depends on what do you mean under 'memory usage'.
How have you measured it?
Do you experience signficant slowdown on this project when
ReSharper is enabled?

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

Hello,

I am using Resharper on a fairly large project with about 100 classes
and 40-50 winforms. The project also uses Infragistics NetAdvantage
and DevExpress WinSuite. When I invoke ReSharper (it's not on by
default), the devenv.exe memory usage goes from 30-40 mb to 300-350
MB.

Is this normal? If not, what can I do to alleviate the problem?

Thanks.



0
Comment actions Permalink

Dmitry Shaporenkov wrote:

Hello frank,

it heavily depends on what do you mean under 'memory usage'. How have
you measured it? Do you experience signficant slowdown on this project when
ReSharper is enabled?


I don't know about Frank, but I am. But this happens especially when
opening a designed form with more than 6500 lines of code.I know this is
testing the limits of Resharper, but refactoring such a beast is nearly
impossible.

It takes nearly two minutes to parse the whole file and colourcode it,
it takes another 3 minutes to find all warnings.

Copy/Pasting large chuncks of code (in order to put them in regions so I
can make sense of the data) regularly causes VS to spin out of control
and hang with 900Mb memory used and 99% processortime.

Disabling resharper solves the issue, but also removed my ability to
refactor easily.

Jesse

0
Comment actions Permalink

Hello Jesse,

first, we admit that there are still performance problems with large files
that are
exacerbated when highlighting is enabled. Though ~ total 5 minutes (if I
understand
correctly) to highlight the file ~ 7000 LOC seems to be an outstanding time.
What CPU does
you machine possess?

Second, highlighting and refactoring are quite different activities. Do you
really suffer from
slow refactorings? Note that as an extreme solution you can disable highlighting
when
editing a particularly large file, and refactorings will still work.

The problem with Copy/Paste is known. It manifests itself when VS option
'Reformat
code on paste' (don't remember the exact wording, but one can find it in
Tools|Options|Text Editor|C#)
is turned on. In such a case VS sends us tons of small text changes caused
by reformatting,
and ReSharper processes them too slowly. Workaround is to disable this option.

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

Dmitry Shaporenkov wrote:

>> Hello frank,
>>
>> it heavily depends on what do you mean under 'memory usage'. How have
>> you measured it? Do you experience signficant slowdown on this
>> project when
>> ReSharper is enabled?

I don't know about Frank, but I am. But this happens especially when
opening a designed form with more than 6500 lines of code.I know this
is testing the limits of Resharper, but refactoring such a beast is
nearly impossible.

It takes nearly two minutes to parse the whole file and colourcode it,
it takes another 3 minutes to find all warnings.

Copy/Pasting large chuncks of code (in order to put them in regions so
I can make sense of the data) regularly causes VS to spin out of
control and hang with 900Mb memory used and 99% processortime.

Disabling resharper solves the issue, but also removed my ability to
refactor easily.

Jesse



0
Comment actions Permalink

Dmitry Shaporenkov wrote:

Hello Jesse,

first, we admit that there are still performance problems with large
files that are
exacerbated when highlighting is enabled. Though ~ total 5 minutes (if I
understand
correctly) to highlight the file ~ 7000 LOC seems to be an outstanding
time. What CPU does
you machine possess?


It's a HP desktop with 512 MB physical memory and a 2GHz P4 processor.
But it's significantly slower than my P3 1000MHz/768MB at home, mostly
due to the fact that my home system possesses a much faster hard drive,
has a little more memory and has been defragmented/optimized.
Performance tuning the system is no option however, as they're all
standard images from the office automation team of the customer I'm
currently working for and they don't allow us to change things in order
to keep all installations the same (will take two months to implement
optimizations, I know it sounds crazy, but it's the only way).

Second, highlighting and refactoring are quite different activities. Do
you really suffer from
slow refactorings?


No, refactoring is fast, but the loading of the file is so slow, that it
takes long to make it smaller...

Note that as an extreme solution you can disable
highlighting when
editing a particularly large file, and refactorings will still work.


Is there a way to notify me when the parsing will take forever, so I can
disable it at that point? Sort of what IE does with long pieces of
Javascript.

The problem with Copy/Paste is known. It manifests itself when VS option
'Reformat code on paste' (don't remember the exact wording, but one can
find it in Tools|Options|Text Editor|C#)
is turned on. In such a case VS sends us tons of small text changes
caused by reformatting,
and ReSharper processes them too slowly. Workaround is to disable this
option.


Ok, I understand, I do like this option though, would it be possible for
the future, to format the paste buffer, unsub from the event of VS,
paste and then resub the event?

Thank you for the feedback so far,

Jesse Houwing


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

>> Dmitry Shaporenkov wrote:
>>
>>> Hello frank,
>>>
>>> it heavily depends on what do you mean under 'memory usage'. How have
>>> you measured it? Do you experience signficant slowdown on this
>>> project when
>>> ReSharper is enabled?
>> I don't know about Frank, but I am. But this happens especially when
>> opening a designed form with more than 6500 lines of code.I know this
>> is testing the limits of Resharper, but refactoring such a beast is
>> nearly impossible.
>>
>> It takes nearly two minutes to parse the whole file and colourcode it,
>> it takes another 3 minutes to find all warnings.
>>
>> Copy/Pasting large chuncks of code (in order to put them in regions so
>> I can make sense of the data) regularly causes VS to spin out of
>> control and hang with 900Mb memory used and 99% processortime.
>>
>> Disabling resharper solves the issue, but also removed my ability to
>> refactor easily.
>>
>> Jesse
>>


0
Comment actions Permalink

Hello Jesse,

I don't think it is possible to disable parsing - it is required for almost
all ReSharper features to work. What you can do is to disable highlighting
as I described in the previous post.

We should definitely think about better handling text changes in VS. Thank
you
for your suggestion, it sounds quite reasonable.

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

Dmitry Shaporenkov wrote:

>> Hello Jesse,
>>
>> first, we admit that there are still performance problems with large
>> files that are
>> exacerbated when highlighting is enabled. Though ~ total 5 minutes
>> (if I
>> understand
>> correctly) to highlight the file ~ 7000 LOC seems to be an
>> outstanding
>> time. What CPU does
>> you machine possess?

It's a HP desktop with 512 MB physical memory and a 2GHz P4 processor.
But it's significantly slower than my P3 1000MHz/768MB at home, mostly
due to the fact that my home system possesses a much faster hard
drive, has a little more memory and has been defragmented/optimized.
Performance tuning the system is no option however, as they're all
standard images from the office automation team of the customer I'm
currently working for and they don't allow us to change things in
order to keep all installations the same (will take two months to
implement optimizations, I know it sounds crazy, but it's the only
way).

>> Second, highlighting and refactoring are quite different activities.
>> Do
>> you really suffer from
>> slow refactorings?

No, refactoring is fast, but the loading of the file is so slow, that
it takes long to make it smaller...

>> Note that as an extreme solution you can disable
>> highlighting when
>> editing a particularly large file, and refactorings will still work.

Is there a way to notify me when the parsing will take forever, so I
can disable it at that point? Sort of what IE does with long pieces of
Javascript.

>> The problem with Copy/Paste is known. It manifests itself when VS
>> option
>> 'Reformat code on paste' (don't remember the exact wording, but one
>> can
>> find it in Tools|Options|Text Editor|C#)
>> is turned on. In such a case VS sends us tons of small text changes
>> caused by reformatting,
>> and ReSharper processes them too slowly. Workaround is to disable
>> this
>> option.

Ok, I understand, I do like this option though, would it be possible
for the future, to format the paste buffer, unsub from the event of
VS, paste and then resub the event?

Thank you for the feedback so far,

Jesse Houwing

>> Regards,
>> Dmitry Shaporenkov
>> JetBrains, Inc
>> http://www.jetbrains.com
>> "Develop with pleasure!"
>>> Dmitry Shaporenkov wrote:
>>>
>>>> Hello frank,
>>>>
>>>> it heavily depends on what do you mean under 'memory usage'. How
>>>> have
>>>> you measured it? Do you experience signficant slowdown on this
>>>> project when
>>>> ReSharper is enabled?
>>> I don't know about Frank, but I am. But this happens especially when
>>> opening a designed form with more than 6500 lines of code.I know
>>> this is testing the limits of Resharper, but refactoring such a
>>> beast is nearly impossible.
>>>
>>> It takes nearly two minutes to parse the whole file and colourcode
>>> it, it takes another 3 minutes to find all warnings.
>>>
>>> Copy/Pasting large chuncks of code (in order to put them in regions
>>> so I can make sense of the data) regularly causes VS to spin out of
>>> control and hang with 900Mb memory used and 99% processortime.
>>>
>>> Disabling resharper solves the issue, but also removed my ability to
>>> refactor easily.
>>>
>>> Jesse
>>>


0
Comment actions Permalink

I have had this problem as well especially in a typed dataset class...I know
i am not going to be making any changes to that file but would want to open
it to look at a few things or do a debug it takes a couple of minutes to
even open it ...


"Dmitry Shaporenkov" <dsha@jetbrains.com> wrote in message
news:c8a894d92f01d8c74bab8194ca49@news.intellij.net...

Hello Jesse,

>

I don't think it is possible to disable parsing - it is required for
almost
all ReSharper features to work. What you can do is to disable highlighting
as I described in the previous post.

>

We should definitely think about better handling text changes in VS. Thank
you
for your suggestion, it sounds quite reasonable.

>

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

>
>> Dmitry Shaporenkov wrote:
>>
>>> Hello Jesse,
>>>
>>> first, we admit that there are still performance problems with large
>>> files that are
>>> exacerbated when highlighting is enabled. Though ~ total 5 minutes
>>> (if I
>>> understand
>>> correctly) to highlight the file ~ 7000 LOC seems to be an
>>> outstanding
>>> time. What CPU does
>>> you machine possess?
>> It's a HP desktop with 512 MB physical memory and a 2GHz P4 processor.
>> But it's significantly slower than my P3 1000MHz/768MB at home, mostly
>> due to the fact that my home system possesses a much faster hard
>> drive, has a little more memory and has been defragmented/optimized.
>> Performance tuning the system is no option however, as they're all
>> standard images from the office automation team of the customer I'm
>> currently working for and they don't allow us to change things in
>> order to keep all installations the same (will take two months to
>> implement optimizations, I know it sounds crazy, but it's the only
>> way).
>>
>>> Second, highlighting and refactoring are quite different activities.
>>> Do
>>> you really suffer from
>>> slow refactorings?
>> No, refactoring is fast, but the loading of the file is so slow, that
>> it takes long to make it smaller...
>>
>>> Note that as an extreme solution you can disable
>>> highlighting when
>>> editing a particularly large file, and refactorings will still work.
>> Is there a way to notify me when the parsing will take forever, so I
>> can disable it at that point? Sort of what IE does with long pieces of
>> Javascript.
>>
>>> The problem with Copy/Paste is known. It manifests itself when VS
>>> option
>>> 'Reformat code on paste' (don't remember the exact wording, but one
>>> can
>>> find it in Tools|Options|Text Editor|C#)
>>> is turned on. In such a case VS sends us tons of small text changes
>>> caused by reformatting,
>>> and ReSharper processes them too slowly. Workaround is to disable
>>> this
>>> option.
>> Ok, I understand, I do like this option though, would it be possible
>> for the future, to format the paste buffer, unsub from the event of
>> VS, paste and then resub the event?
>>
>> Thank you for the feedback so far,
>>
>> Jesse Houwing
>>
>>> Regards,
>>> Dmitry Shaporenkov
>>> JetBrains, Inc
>>> http://www.jetbrains.com
>>> "Develop with pleasure!"
>>>> Dmitry Shaporenkov wrote:
>>>>
>>>>> Hello frank,
>>>>>
>>>>> it heavily depends on what do you mean under 'memory usage'. How
>>>>> have
>>>>> you measured it? Do you experience signficant slowdown on this
>>>>> project when
>>>>> ReSharper is enabled?
>>>> I don't know about Frank, but I am. But this happens especially when
>>>> opening a designed form with more than 6500 lines of code.I know
>>>> this is testing the limits of Resharper, but refactoring such a
>>>> beast is nearly impossible.
>>>>
>>>> It takes nearly two minutes to parse the whole file and colourcode
>>>> it, it takes another 3 minutes to find all warnings.
>>>>
>>>> Copy/Pasting large chuncks of code (in order to put them in regions
>>>> so I can make sense of the data) regularly causes VS to spin out of
>>>> control and hang with 900Mb memory used and 99% processortime.
>>>>
>>>> Disabling resharper solves the issue, but also removed my ability to
>>>> refactor easily.
>>>>
>>>> Jesse
>>>>
>



0
Comment actions Permalink

Hello frank,

it heavily depends on what do you mean under 'memory
usage'.
How have you measured it?


The Mem Usage column in the Task Manager goes through the roof when ReSharper is enabled.

Do you experience signficant slowdown on this project
when
ReSharper is enabled?


Yes, mostly when switching from the Form Designer view to Code View. I have not experienced the type of slowdowns other people are talking about (which is just in the code view).

The problem is probably the amount of lines ReSharper must parse through. If you throw a 3rd party grid onto a form, it alone generates 2000 lines of "designer generated code". Anyway, that's something ReSharper will have to deal with.

So, do you have any suggestions?

I am running on a 2.8mgz laptop with 1.25 GB of RAM.


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

Hello,

I am using Resharper on a fairly large project with

about 100 classes

and 40-50 winforms. The project also uses

Infragistics NetAdvantage

and DevExpress WinSuite. When I invoke ReSharper

(it's not on by

default), the devenv.exe memory usage goes from

30-40 mb to 300-350

MB.

Is this normal? If not, what can I do to alleviate

the problem?


Thanks.



0
Comment actions Permalink

Hello frank,

ReSharper indeed stores large amount information in RAM, so it affects the
Mem Usage column.

Please try to temporarily disable error highlighting (ReSharper|Options|General|Highlighting)

when editing large files and check if this makes any difference.

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

>> Hello frank,
>>
>> it heavily depends on what do you mean under 'memory
>> usage'.
>> How have you measured it?

The Mem Usage column in the Task Manager goes through the roof when
ReSharper is enabled.

>> Do you experience signficant slowdown on this project
>> when
>> ReSharper is enabled?

Yes, mostly when switching from the Form Designer view to Code View.
I have not experienced the type of slowdowns other people are talking
about (which is just in the code view).

The problem is probably the amount of lines ReSharper must parse
through. If you throw a 3rd party grid onto a form, it alone
generates 2000 lines of "designer generated code". Anyway, that's
something ReSharper will have to deal with.

So, do you have any suggestions?

I am running on a 2.8mgz laptop with 1.25 GB of RAM.

>> Regards,
>> Dmitry Shaporenkov
>> JetBrains, Inc
>> http://www.jetbrains.com
>> "Develop with pleasure!"
>>> Hello,
>>>
>>> I am using Resharper on a fairly large project with
>>>
>> about 100 classes
>>
>>> and 40-50 winforms. The project also uses
>>>
>> Infragistics NetAdvantage
>>
>>> and DevExpress WinSuite. When I invoke ReSharper
>>>
>> (it's not on by
>>
>>> default), the devenv.exe memory usage goes from
>>>
>> 30-40 mb to 300-350
>>
>>> MB.
>>>
>>> Is this normal? If not, what can I do to alleviate
>>>
>> the problem?
>>
>>> Thanks.
>>>


0
Comment actions Permalink

I have the same problem, "Disable Highlighting" works for me, but it would be nice to have a shortcut for this

0

Please sign in to leave a comment.