This issue was reported manually by gorrus.
It already has 3 duplicates
Build: NetBeans IDE Dev (Build 201306102301)
VM: Java HotSpot(TM) Client VM, 23.21-b01, Java(TM) SE Runtime Environment, 1.7.0_21-b11
gorrus: go to type
gorrus: c and java projects opened
gorrus: go to type
Maximum slowness yet reported was 144227 ms, average is 62335
Created attachment 135808 [details]
One of the possible reason is that CppTypeProvider (possibly) didn't see that the task was cancelled...
Fixed in https://hg.netbeans.org/cnd-main/rev/fce8c4d3b47f
Another problem is that current implementation of CppTypeProvider doesn't use the possibility to return a partial result. This means that no results passed back to the infrastructure until the whole search is complete (that is why we see this slowness alarm).
The fix is to use pendingResult() call to notify the infrastructure to call computeTypeNames() again.
There are some notes though:
- the infrastructure doesn't handle correctly the situation when computeTypeNames() returns while the result remains empty (because no result is ready yet). Even if pendingResult() was called, a dialog will display "<No results found>" instead of a message with a 'Cancel' hyperlink. [This situation is currently handled in the fix (on the client side, in CppTypeProvider). But this could cause a slowness alarm if time of getting first results exceeds a threshold]
- There is no any visual indication of whether the search is finished or not. But this should be implemented on the infrastructure side.
- javadoc states that computeTypeNames is always called twice - first time with a current project, the second one is with context.project == null. This is not implemented this way (at least at current moment). Now context.project is *always* null. IMO this is OK. But if the behavior is changed, the possible impact could be that we will search through the same (current) project twice.
Integrated into 'main-silver', will be available in build *201307252300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
User: Andrew Krasny <email@example.com>
Log: Bug #231282 - GoToType took 144227 ms.