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 45228 - Goto declaration is very slow
Summary: Goto declaration is very slow
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Navigation (show other bugs)
Version: 4.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: issues@editor
URL:
Keywords: PERFORMANCE, RANDOM
Depends on:
Blocks:
 
Reported: 2004-06-19 00:06 UTC by _ rkubacki
Modified: 2007-11-05 13:40 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
stack trace (3.06 KB, text/plain)
2004-06-19 00:07 UTC, _ rkubacki
Details
thread dump (24.26 KB, text/plain)
2004-07-19 12:39 UTC, _ rkubacki
Details
Use of Java Hierarchy (35.04 KB, image/gif)
2004-07-20 18:39 UTC, Miloslav Metelka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ rkubacki 2004-06-19 00:06:49 UTC
dev build from Jun19, Linux, JDK1.5.0b55

Alt-G on some method method often causes heavy
parsing leaving the IDE nonresponsive for a
significant time like tens of seconds. Sometimes
it even causes OutOfMemory errors if I have larger
set of project.

It seems to me that most of the work comes from
NbJavaJMISyntaxSupport.buildGlobalVariableMap. I
added tracing to ASTProvider.createASTree and 100
source files (mostly from src.zip) can be parsed
in order to complete one action. I will attach
root of typical stack trace tha can be dumped
during the action.
Comment 1 _ rkubacki 2004-06-19 00:07:20 UTC
Created attachment 15853 [details]
stack trace
Comment 2 Miloslav Metelka 2004-06-30 13:28:58 UTC
Radime,
 as there were certain improvements done could you please check this
again? Also could you be more concrete and give us some concrete cases
and numbers that we can work with and improve? Thanks.
Comment 3 Antonin Nebuzelsky 2004-07-01 17:18:48 UTC
Milo, I think this problem is not fixed completely. I was able to get
up to 20 seconds, though in majority of the cases the times were
reasonable (up to ~1-2 seconds). I did not find any reproducible case.
Comment 4 Miloslav Metelka 2004-07-16 11:32:18 UTC
Well, it's tough. I'm confident that the code for this feature on the
editor side does not take up 20 secs. It's likely some dependent java
parsing being done on the background that causes slowness of this
feature which, unfortunately, resides in the editor module so that is
the place where the bugs are entered against ;)
 Tondo, if it happens to you again, could you please try to catch some
thread dumps to confirm or reject that idea of background parsing
being done? Thanks.
Comment 5 Antonin Nebuzelsky 2004-07-19 10:35:14 UTC
Downgrading to P3. This is a random behavior and in majority of cases
the responsiveness of the action is reasonable.
Comment 6 _ rkubacki 2004-07-19 12:39:29 UTC
Created attachment 16309 [details]
thread dump
Comment 7 _ rkubacki 2004-07-19 12:41:17 UTC
In o.n.editor.Completion 391:38 press Alt-G to go to JDCPopupPanel.
One thread dump is attached. I hope it helps.
Comment 8 Miloslav Metelka 2004-07-20 18:34:34 UTC
I've ran the IDE in OptimizeIt but unfortunately I did not experience
an extra slowness on the usecase that Radim provided.

BTW I have found one particular place where the SourceCookie.Editor
(implemented by JavaParserGlue) gets used. I guess that it could be
worth to eliminate the SourceCookie.Editor use and go directly through
JMIs. Attaching the stacktrace.
Comment 9 Miloslav Metelka 2004-07-20 18:39:00 UTC
Created attachment 16351 [details]
Use of Java Hierarchy
Comment 10 Dusan Balek 2004-07-21 13:24:52 UTC
Eliminating SourceCookie.Editor use.

Checking in JMIUtils.java;
/cvs/editor/src/org/netbeans/modules/editor/java/JMIUtils.java,v  <--
 JMIUtils.java
new revision: 1.32; previous revision: 1.31
done
Checking in JavaKit.java;
/cvs/editor/src/org/netbeans/modules/editor/java/JavaKit.java,v  <-- 
JavaKit.java
new revision: 1.92; previous revision: 1.91
done
Checking in NbJMIResultItem.java;
/cvs/editor/src/org/netbeans/modules/editor/java/NbJMIResultItem.java,v
 <--  NbJMIResultItem.java
new revision: 1.16; previous revision: 1.15
done
Checking in NbJavaJMISyntaxSupport.java;
/cvs/editor/src/org/netbeans/modules/editor/java/NbJavaJMISyntaxSupport.java,v
 <--  NbJavaJMISyntaxSupport.java
new revision: 1.20; previous revision: 1.19
done
Comment 11 Roman Strobl 2004-12-08 17:10:45 UTC
Changing subcomponent to navigation.
Comment 12 Roman Strobl 2005-01-10 13:19:44 UTC
Changed target milestone to TBD.
Comment 13 _ rkubacki 2005-03-02 12:55:49 UTC
I guess we can close it now.