Community
Participate
Working Groups
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
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.
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.
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.
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.
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.