Bug 231282 - GoToType took 144227 ms.
GoToType took 144227 ms.
Status: RESOLVED FIXED
Product: cnd
Classification: Unclassified
Component: Code Model
7.4
All All
: P3 (vote)
: 7.4
Assigned To: Andrew Krasny
issues@cnd
EXCEPTIONS_REPORT perf-profileme
: PERFORMANCE
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-14 15:22 UTC by Egor Ushakov
Modified: 2013-07-26 02:48 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
:


Attachments
nps snapshot (887.55 KB, application/nps)
2013-06-14 15:22 UTC, Egor Ushakov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Egor Ushakov 2013-06-14 15:22:50 UTC
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
OS: SunOS

User Comments:
gorrus: go to type

gorrus: c and java projects opened

gorrus: go to type



Maximum slowness yet reported was 144227 ms, average is 62335
Comment 1 Egor Ushakov 2013-06-14 15:22:58 UTC
Created attachment 135808 [details]
nps snapshot
Comment 2 Andrew Krasny 2013-07-24 12:47:02 UTC
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
Comment 3 Andrew Krasny 2013-07-24 21:52:05 UTC
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.


Changeset: https://hg.netbeans.org/cnd-main/rev/5dc1337cf27a
Comment 4 Quality Engineering 2013-07-26 02:48:40 UTC
Integrated into 'main-silver', will be available in build *201307252300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/fce8c4d3b47f
User: Andrew Krasny <akrasny@netbeans.org>
Log: Bug #231282 - GoToType took 144227 ms.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo