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 53520 - Unacceptable performance of "New Class" wizard in large projects
Summary: Unacceptable performance of "New Class" wizard in large projects
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Project (show other bugs)
Version: 4.x
Hardware: PC Windows XP
: P2 blocker (vote)
Assignee: Petr Hrebejk
URL:
Keywords: PERFORMANCE
: 54065 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-01-17 15:58 UTC by jessholle
Modified: 2005-03-21 18:08 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jessholle 2005-01-17 15:58:53 UTC
I have a project with ~1650 known packages
overall, around ~1450 of which are represented in
the source directory (around 28,000 classes
totaling over 100MB when compiled).

It takes the New / Java Class wizard several
*minutes* to come up -- apparently because it
insists on filling out a drop down containing a
list of all known packages.  It apparently does
not cache this either as it takes just about as
long the second, third, etc, time.

The fact that New / Java Class is so much slower
than the source package node in the project tree
and that the source package node was pretty fast
(i.e. apparently pre-cached) after New / Java
Class makes me tend to think that the issue may
largely be one-at-a-time addition to a JComboBox
or some such.  On the other hand, NB4's CPU
consumption goes through the roof and slows down
my whole machine upon New / Java Class, so there
may be more going on here.

I did not take time to do a thread dump, monitor
in jconsole, or any such -- sorry.

Also, I assume that this is also an issue with New
Package, etc, but have not verified that.
Comment 1 Tomas Zezula 2005-01-17 16:38:45 UTC
It probably needs an UI Change.
Comment 2 Petr Hrebejk 2005-01-17 16:53:48 UTC
If you have a chance to attach a thread dumb I would apreciate it.

Do I understand it corectly that the flatened package in projects tab
has acceptable performance but the wizard does not? 

Thanks 
HREBEJK.
Comment 3 jessholle 2005-01-17 17:05:37 UTC
The flattened package has *more* acceptable performance, but I would
not exactly say acceptable :-)  I understand there is a workaround
setting for this issue, however, and (more importantly) this does not
really have to be part of my workflow.  "New Class" most developers'
workflow and having to workaround it via "New Empty File..." leaves a
bad impression (not to mention the fact that when one forgets and uses
it there is nothing to do but wait).

I'll try to find some time for a thread dump.
Comment 4 Tomas Zezula 2005-01-27 15:58:32 UTC
*** Issue 54065 has been marked as a duplicate of this issue. ***
Comment 5 Petr Hrebejk 2005-03-21 18:08:06 UTC
The list of packages should now be compouted faster and not in AWT. So one
should be able to work with the wizard even in large project. However if you
want to create a class in specific package I recommend to invoke the action on
the package node, this will put the package name into to combo box editor and
you should be able to finish the wizard immediately.

Checking in project/src/org/netbeans/modules/java/project/Bundle.properties;
/cvs/java/project/src/org/netbeans/modules/java/project/Bundle.properties,v  <--
 Bundle.properties
new revision: 1.31; previous revision: 1.30
done
Checking in
project/src/org/netbeans/modules/java/project/JavaTargetChooserPanelGUI.java;
/cvs/java/project/src/org/netbeans/modules/java/project/JavaTargetChooserPanelGUI.java,v
 <--  JavaTargetChooserPanelGUI.java
new revision: 1.25; previous revision: 1.24
done
Checking in project/src/org/netbeans/modules/java/project/PackageDisplayUtils.java;
/cvs/java/project/src/org/netbeans/modules/java/project/PackageDisplayUtils.java,v
 <--  PackageDisplayUtils.java
new revision: 1.4; previous revision: 1.3
done
Checking in project/src/org/netbeans/spi/java/project/support/ui/Bundle.properties;
/cvs/java/project/src/org/netbeans/spi/java/project/support/ui/Bundle.properties,v
 <--  Bundle.properties
new revision: 1.9; previous revision: 1.8
done
Checking in project/src/org/netbeans/spi/java/project/support/ui/PackageView.java;
/cvs/java/project/src/org/netbeans/spi/java/project/support/ui/PackageView.java,v
 <--  PackageView.java
new revision: 1.11; previous revision: 1.10
done
Checking in
project/src/org/netbeans/spi/java/project/support/ui/PackageViewChildren.java;
/cvs/java/project/src/org/netbeans/spi/java/project/support/ui/PackageViewChildren.java,v
 <--  PackageViewChildren.javanew revision: 1.56; previous revision: 1.55
done