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 34041 - Creating new classes is slow
Summary: Creating new classes is slow
Status: RESOLVED WONTFIX
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 3.x
Hardware: PC Windows ME/2000
: P2 blocker (vote)
Assignee: issues@java
URL: http://performance.netbeans.org/repor...
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2003-05-30 10:47 UTC by Tomas Pavek
Modified: 2007-09-26 09:14 UTC (History)
0 users

See Also:
Issue Type: TASK
Exception Reporter:


Attachments
profiling snapshot of 1st use of "Next" step; "sampler" method (176.03 KB, application/octet-stream)
2003-05-30 11:01 UTC, Tomas Pavek
Details
classes loaded during the 1st "Next" step invocation (40.58 KB, text/plain)
2003-05-30 11:03 UTC, Tomas Pavek
Details
profiling snapshot of 1st finishing wizard and opening java file; "sampler" profiling method (298.21 KB, application/octet-stream)
2003-05-30 11:12 UTC, Tomas Pavek
Details
profiling snapshot of 2nd finishing wizard and opening file; "sampler" profiling method (144.91 KB, application/octet-stream)
2003-05-30 11:12 UTC, Tomas Pavek
Details
classes loaded during 1st finish&open (29.24 KB, text/plain)
2003-05-30 11:13 UTC, Tomas Pavek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Pavek 2003-05-30 10:47:50 UTC
According to the report (see URL) and additional
measuring done on prj40_prototype build
200305230000, there are two steps in creating a
class that are unacceptably slow. Note this is
related mainly to the first use of the New wizard.

(1) going to the second page of the New wizard (to
enter
    name after choosing template - measured for Main
    template); this takes almost 4 seconds for the
first
    time (should be max 1 sec, in NB 3.5 this was
under 1
    sec), subsequent invocation is ok

(2) finishing the wizard and opening the file in
editor;
    this took about 6 sec first time (should be
max 2 sec,
    in NB 3.5 this was 2.4 sec), and 1.5 sec when
repeated
    (should be max 1 sec)

[build 200305230000, jdk 1.4.1_02, Win2000, PC 733MHz]
Comment 1 Tomas Pavek 2003-05-30 10:57:25 UTC
See also issue 28959 how the responsiveness was improved in NB 3.5.
Comment 2 Tomas Pavek 2003-05-30 11:00:23 UTC
Attaching profiling snapshots done in OptimizeIt on build 200305230000
(note creating new class does not work in newer 200305300000).
Comment 3 Tomas Pavek 2003-05-30 11:02:00 UTC
Created attachment 10522 [details]
profiling snapshot  of 1st use of "Next" step;  "sampler" method
Comment 4 Tomas Pavek 2003-05-30 11:03:49 UTC
Created attachment 10523 [details]
classes loaded during the 1st "Next" step invocation
Comment 5 Tomas Pavek 2003-05-30 11:10:26 UTC
(1) seems to be the usual first-use heavy class loading &
initialization problem - about 700 classes are loaded. This is a bit
better in 20030528 build where editor warm-up was partially
reimplemented, but editor probably should not be touched at all in
this phase...
Parsing seems to be involved significantly too.

I guess this could be tuned using a reasonable combination of lazy
initialization and warm-up techniques.
Comment 6 Tomas Pavek 2003-05-30 11:12:08 UTC
Created attachment 10524 [details]
profiling snapshot  of 1st  finishing wizard and opening java file;  "sampler" profiling method
Comment 7 Tomas Pavek 2003-05-30 11:12:58 UTC
Created attachment 10525 [details]
profiling snapshot of 2nd finishing wizard and opening file;  "sampler" profiling method
Comment 8 Tomas Pavek 2003-05-30 11:13:51 UTC
Created attachment 10526 [details]
classes loaded during 1st finish&open
Comment 9 Tomas Pavek 2003-05-30 11:21:18 UTC
(2) also suffers from class loading & initialization in the first use,
but there is also significant time spent in tempalte instantiation
even for the second time. There could be also some inefficiency in
updating the UI (explorer nodes, opening editor).
Comment 10 Jan Pokorsky 2003-11-26 16:34:22 UTC
The projects prototype has been canceled. For more details see
http://www.netbeans.org/servlets/ReadMsg?msgId=619519&listName=nbdiscuss