Bug 95584 - call hierachy takes long to prune frequent method names
Summary: call hierachy takes long to prune frequent method names
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.1   Edit
Hardware: PC Linux-GTK
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2005-05-17 11:38 EDT by Tom Hofmann CLA
Modified: 2005-05-26 11:20 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Hofmann CLA 2005-05-17 11:38:56 EDT
M7

As discussed with Tobias

- sizeable workspace (e.g. eclipse development)
- create a CU A.java:

public class A {
  public String getName(){return null;}
}

- caret on 'getName', invoke the call hierarchy

> it takes quite a while (0.5 - 1 minute in my case) to find that there are no
callers of the method
> I assume this is because there are many false positive method matches reported
by the search engine that need to be pruned.
> The query taking so long is bad from the user's viewpoint because he knows
that this class is not used in many places and there cannot be many callers of
the method
Comment 1 Dirk Baeumer CLA 2005-05-17 14:35:25 EDT
Markus, can you please comment.

From my understanding call hierarchy uses search so there is nothing we can do
to speed this up. The only question is which scope are we using.
Comment 2 Markus Keller CLA 2005-05-18 12:14:40 EDT
The call hierarchy now only searches in projects referencing the target project.
But IMO, the main problem is that we also search the JRE libraries.
Comment 3 Dirk Baeumer CLA 2005-05-18 13:08:17 EDT
But we can't eliminate the JRE since the method in question can be inside the
JRE. We could try to detect this and then exclude JRE.
Comment 4 Markus Keller CLA 2005-05-18 13:20:01 EDT
Yes, but that would have to be somewhat sophisticated. E.g. here:

    class MyVec extends Vector {
        public synchronized void addElement(Object arg0) {};
    }

When we create the call hierarchy for MyVec#addElement(..), we would still have
to search the JRE, since method references search is polymorphic.

However, this optimization should also be added to the normal search if we
decide to implement it.
Comment 5 Dirk Baeumer CLA 2005-05-26 11:20:01 EDT
If we have to create a type hierarchy to optimize the scope then this can be
counter productive. Opt to not do this optimization.

Marking as fixed.