This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 245384 - Go to Declaration from library class to library class inexplicably slow
Summary: Go to Declaration from library class to library class inexplicably slow
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 8.0.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: Tomas Stupka
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2014-07-03 19:26 UTC by Jesse Glick
Modified: 2015-06-23 02:40 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
.npss file attached from NetBeans (203.81 KB, application/x-npss)
2014-07-03 19:28 UTC, Jesse Glick
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2014-07-03 19:26:28 UTC
20140630-368fe2537540. Often I have some Maven project open, such as a Jenkins plugin, with a deep & broad binary dependency graph; most of those JARs have attached sources. Go to Declaration between source files in the project is quick. GtD from a source file in the project to a read-only attached source in a dependency JAR is usually slower, but still reasonable.

But GtD from one class in the dependency to another in the same dependency is very slow, often >10s (so enough to show the dialog indicating that it is calculating the declaration position)—even if the destination class is already open in the editor. In fact it is much slower to jump to the destination class from another class in its same JAR then it is from a class in the source project.

Is something about the classpath of the binary dependency not being cached?
Comment 1 Jesse Glick 2014-07-03 19:28:31 UTC
Created attachment 147871 [details]
.npss file attached from NetBeans

.npss file
Comment 2 Jesse Glick 2014-07-03 19:32:00 UTC
It is not clear to me from the profiler snapshot whether the overhead is from resolving the FQN and thus JAR location of the destination class, or finding the location of the class declaration in that source file. If the latter, this is senseless since in most cases I am jumping to a top-level class and could not care less about having the caret deposited on the class declaration. Better to open the source file immediately, and if computing the declaration position takes more than a fraction of a second, just give up and let the user scroll to whatever they were looking for.
Comment 3 Tomas Zezula 2014-07-04 07:42:59 UTC
Go to declaration is a part of java.editor.
Comment 4 Dusan Balek 2014-07-08 09:12:22 UTC
Unfortunately, the classpath information is necessary to resolve the destination class - thus the proposed enhancement makes no sense. Maven projects should improve their response time to the key queries. Reassigning.
Comment 5 Tomas Stupka 2015-06-19 12:40:10 UTC
the mavenproject has to be loaded in some such cases. Will add a cache so that subsequent calls do not have load the project again.
Comment 6 Tomas Stupka 2015-06-19 14:46:04 UTC
fixed in jet-main #36edc57084d5
Comment 7 Quality Engineering 2015-06-23 02:40:58 UTC
Integrated into 'main-silver', will be available in build *201506230001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/36edc57084d5
User: Tomas Stupka <tstupka@netbeans.org>
Log: Issue #245384 - Go to Declaration from library class to library class inexplicably slow