Find Usages still unusably slow

I posted about this a month ago, and Jetbrains has stopped responding to
the thread so I thought I would start a new thread to try to get some attention.
I have downloaded the latest EAP build of ReSharper 5 and the Find Usages
is still unusably slow for my project.  It takes several minutes to find
the usages of simple methods and classes (that only have a couple usages
in the solution).  This behavior is very fast in version 4.5 of ReSharper.

My solution contains about 4 or 5 projects, including a Website project that
includes a reference to ASP.NET MVC.  When its trying to find all usages,
it seems to be scanning lots of files (.aspx, .ascx, .cs, .xml).  Its like
it either does not have things cached like it did in version 4.5, or its
just not looking in the cache.

This problem makes it impossible to use versio 5 for me as I depend on find
usages all the time to do my work.  I know I am not the only one experiencing
this.  Please consider this a high priority bug so that we can upgrade to
version 5 when it comes out.

I am using VS2008 by the way.

Thanks,

~Andy Alm


19 comments
Comment actions Permalink

Hi Andrew!
Sorry for not responding, we thought problem was resolved.

By our measurement we had speedup search in MVC projects at least in 10 times.
It' still a little slower than in ReSharper 4.5 but appropriate and tradable for new functionality.

Did you try latest nightly builds?
If yes, what exactly version do you use?

0
Comment actions Permalink

Hello Slava,

I'm sorry to say I have not seen the improvement.  The Find usages of a simple
method that has about 3 usages in the solution takes several minutes to find
in v5, while it took only a few seconds in v4.5.  I am using one of the latest
builds (1634). A fast response for this functionality is critical to me doing
my job efficiently.

~Andy


0
Comment actions Permalink

Andy, it's hard to say what's wrong in your case...

Can you profile find usages in your project with dotTrace and send us a trace?
You can download free EAP version.
Or, if you want - send us problem sources. We can sign NDA.

0
Comment actions Permalink

Hello Slava,

I actually sent a dotTrace snapshot a few weeks back for this same issue
(I was corresponding with Ilya Ryzhenkov back then).  He wasn't able to open
it because it was so large (keep in mind this was for only one find usages
search).  I can tell you that what I observe is ReSharper appears to scan
pretty much every file in the web project (the model dialog runs through
a list of files its looking for and seems to be looking in lots of .aspx,
.ascx, .xml, and .cs files).  In a large project, that obviously will not
perform very well.  It clearly does not do this in ReSharper 4.5 because
the search takes only a few seconds.  Obviously, you would know more about
the architectural changes between 4.5 and 5 than I, but it seems like its
not caching near as much information as it was in v5.

Would it still be useful if I captured a dotTrace snapshot and ended it 20-30
seconds into the search?  If I let it go for the entire search than the snapshot
is too big for dotTrace to open it.  Also, is there a location I can FTP
the snapshot to?  It will be way to big for me to post on this forum thread.

~Andy

Andy, it's hard to say what's wrong in your case...

Can you profile find usages in your project with dotTrace and send us
a trace?
You can download free EAP version.
Or, if you want - send us problem sources. We can sign NDA.
---
Original message URL:
http://www.jetbrains.net/devnet/message/5258649#5258649




0
Comment actions Permalink

Hello Andy,

dotTrace 3.1 can't work with large snapshots. Please try to use dotTrace
4.0 for getting snapshot with this problem.
Look at the dotTrace 4.0 EAP home page for downloading dotTrace 4.0 build
http://confluence.jetbrains.net/display/NetProf/EAP

Thanks in advance.

Best regards,
Alexander Nesterenko
ReSharper developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


0
Comment actions Permalink

Exactly that problem with scanning of all files in project we have fixed. Hope so. )
About trace, as suggested Alex, can you try dotTrace 4.0?
While I'll figure with FTP, you can upload it, for example, to http://www.dropbox.com (free account 2GB).

Andy, big thanks for you help in investigation!

0
Comment actions Permalink

Hello Slava,

I downloaded dotTrace 4.0, and unfortunately wasn't able to get it to work.
When I clicked on "Get Snapshot", I got the green bar indicating it was
saving the snapshot, but after that finished, nothing happened.  The "Get
Snapshot" and "Discard Snapshot" buttons stayed greyed out, and the snapshot
was nowhere to be found.  The dotTrace UI had no trace the snapshot had ever
been created.  I searched my hard drive for it and was unable to find it.
I'm not sure what else I can do.

While playing around with the latest build of version 5 some more, I have
definitely noticed that some find usages that were slow before, appear to
be fine now.  However, there are still some that are scanning every file
and taking literally about 10 minutes to complete.  I can't quite narrow
down and figure out in what cases it works and what cases it doesn't.  It
almost appears random (though I'm sure it is not).  The only thing I can
think of is that I could try to zip up the solution and send it to you. 
Do you have a private email I can send it to?  I would really like to help
you get this issue resolved as I'm excited about the new features of version
5 and would really like to be able to use it.

~Andy

Exactly that problem with scanning of all files in project we have
fixed. Hope so. )

About trace, as suggested Alex, can you try dotTrace 4.0?

While I'll figure with FTP, you can upload it, for example, to
http://www.dropbox.com (free account 2GB).

Andy, thanks in advance!

---
Original message URL:
http://www.jetbrains.net/devnet/message/5258745#5258745



0
Comment actions Permalink

Hello Slava,

While I was unable to get dotTrace 4 to work, I went ahead and did it with
version 3.1.  I started the profiler immediately before clicking on Find
Usages, and then ended it after letting the find usages search go for 1 minute
to prevent the snapshot from getting too large.  Hopefully this can get you
enough information to diagnose the problem.  The search ended up taking about
10 minutes total.  It might be worth noting that the search seemed to start
by going through all of the .cs files in the solution, followed by .aspx,
.ascx, and .master files, and then ended with .resx files (I'm not quite
sure why it was looking in .resx files for a method usage)

I was trying to find the usages of a method that is part of an interface.
It has a total of 6 usages in the solution.  The solution contains 3 dll
projects (including one that is an NUnit project), and a website project.

You can get the snapshot here: http://dl.dropbox.com/u/5423938/FindUsagesSlow_FirstMinute.7z

Let me know if I can be of further assistance.

~Andy



0
Comment actions Permalink

About dotTrace I'll ask our team mates.

My work email is slava.trenogin@jetbrains.com.
I am not sure about letter's size limit, so if you will get rejection you can still upload sources to dopbox.com and send me private link by email.

Hope I can help you and will figure out the problem.

0
Comment actions Permalink

Andy Alm wrote:

You can get the snapshot here:
http://dl.dropbox.com/u/5423938/FindUsagesSlow_FirstMinute.7z


Got it! Investigating.

Let me know if I can be of further assistance.


What version of ReSharper did you use in profiling?

0
Comment actions Permalink

Hello Slava,

What version of ReSharper did you use in profiling?


I was using 5.0.1639.5

~Andy






0
Comment actions Permalink

Also, in case its useful:

VS 2008
4GB RAM
Windows Server 2008 x64
Intel Xeon 3.33 GHz (Quad Core w/hyperthreading enabled)

Hello Slava,

>> What version of ReSharper did you use in profiling?
>>

I was using 5.0.1639.5

~Andy



0
Comment actions Permalink

Also, in case its useful:

VS 2008
4GB RAM
Windows Server 2008 x64
Intel Xeon 3.33 GHz (Quad Core w/hyperthreading enabled)

Hello Slava,

>> What version of ReSharper did you use in profiling?
>>

I was using 5.0.1639.5

~Andy



0
Comment actions Permalink

Andy Alm wrote:

Let me know if I can be of further assistance.


Andy, after firt look it's seems very strange. Some methods are called enormous number of time.
For example, 40 million times instead of several hundreds as expected.
So, if you are still available to give sources it will be huge help.

0
Comment actions Permalink

Hello Slava,

So, if you are still available to give sources it will be huge help.


I will talk to my boss and see if I need to get an NDA.  I have your email
so we can continue this discussion via that channel.  Thanks for your responsiveness
and your help.  Its really appreciated.

~Andy


0
Comment actions Permalink

Dear Andrew,

I've fixed doing nothing on "Get Snapshot".

WBR, Mikhail Pilin

0
Comment actions Permalink

Andy Alm wrote:

>> So, if you are still available to give sources it will be huge help.


I will talk to my boss and see if I need to get an NDA.  I have your
email so we can continue this discussion via that channel.  Thanks for
your responsiveness and your help.  Its really appreciated.


Andy, I've made some little optimization, on our tests it's just 10%, but may be in you case it will help more.
Will be available in next nightly build (after 5.0.1642.13).
We are continuing investigating.

0
Comment actions Permalink

Hello Slava,

Andy, I've made some little optimization, on our tests it's just 10%,
but may be in you case it will help more.


I installed the new build and it is a dramatic improvement.  The Usage Search
that I profiled before that was taking 10 minutes to complete now completed
in 25 seconds.  This makes the feature usable again.  However, 25 seconds
is still too long in my opinion.  In Resharper 4.5, it took only 5 seconds.
And the Find Usages search is still listing some .xml, .resx, and .xsd files
in the search, which seems unecessary to me (how can a method call exist
in any of those files?).  Our legal department is working on getting the
NDA together so that I can send you my solution.  Hopefully once I can get
that to you, you will be able to optimize things even further.

Thanks again for your help and support.

~Andy


0

Please sign in to leave a comment.