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.
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?
Created attachment 147871 [details] .npss file attached from NetBeans .npss file
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.
Go to declaration is a part of java.editor.
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.
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.
fixed in jet-main #36edc57084d5
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