History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEADEV-17409
Type: Performance Problem Performance Problem
Status: Open Open
Priority: Normal Normal
Assignee: Alexey Kudravtsev
Reporter: AlexL
Votes: 0
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
IDEA: Development

Find Usages - Usages of Methods of a Class - Should do one search for each group of overloaded methods in a class

Created: 13 May 07 11:24   Updated: 31 May 07 19:35
Component/s: Find, Replace, Find Usages
Fix Version/s: None

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
Environment: Windows XP SP2, dual core

Build: 6,951
Severity: Medium


 Description  « Hide
OBSERVED BEHAVIOR

I have found that when doing Find Usages on a class and checking the option "Usages of methods", that IDEA is being inefficient while searching for class methods which are overloaded.

For example, I have a class which has 8 static methods overloaded on the name "load", and 5 static methods overloaded on the name "create", plus I have 5 different constructors.

In IDEA 6951, what is happening when I do a Find Usages on the class and check "Usages of methods", IDEA is doing a search on each "load", and each "create", and each constructor one at a time, which is making it take much longer – at least 2 minutes longer in this case.

Each search for each variation of "load" and "create" methods is taking a long time,eg. 10-20 seconds; I don't know if this is because the method name is a simple word "load" and "create", or is it because there are alot of usages among the overloaded methods, so IDEA is wasting alot of time looking through the same matches each time.

Thread: 6776 - Find Usages Performance
http://www.intellij.net/forums/thread.jspa?messageID=5188073&#5188073

EXPECTED BEHAVIOR

If I invoke "Find Usages" on a class X, and check the "Usages of methods", then IDEA should first group the methods which have the same name, and IDEA should run the find method usages for all the overloaded methods with that name using the same algorithm that Find Usages on a single method uses when you check "Include overloaded methods". For methods that aren't overloaded, IDEA would just do whatever it is currently doing.

At least in the code I am working with, it is pretty common to have overloaded methods in a class, and if they are public
static with lots of usages, I find that those are the methods taking the most time to find the usages of. So, that's why I think this optimization is worthwhile.



 All   Comments   Work Log   Change History      Sort Order:
There are no comments yet on this issue.