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 34054 - Opening java file takes long time
Summary: Opening java file takes long time
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 16:05 UTC by Tomas Pavek
Modified: 2007-09-26 09:14 UTC (History)
0 users

See Also:
Issue Type: TASK
Exception Reporter:


Attachments
classes loaded during 1st java file open (23.61 KB, text/plain)
2003-05-30 16:09 UTC, Tomas Pavek
Details
profiling snapshot of 1st java file opening; "sampler" prof. method (180.93 KB, application/octet-stream)
2003-05-30 16:10 UTC, Tomas Pavek
Details
profiling snapshot of 2nd java file open; "sampler" prof. method (59.90 KB, application/octet-stream)
2003-05-30 16:11 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 16:05:23 UTC
Opening a java file for the first time lasts over
3 seconds. Should be max 2 seconds, best under 1 sec.

[prj40_prototype build 200305300000, jdk 1.4.1_02,
Win2000, PC 733 MHz]
Comment 1 Tomas Pavek 2003-05-30 16:09:03 UTC
Looks like usual first-use class loading and initialization problem.
Note there is an improvement over the 4.5 sec time mentioned in the
Initial perf. report - this is caused by re-implementing editor
warm-up in projects (from NB 3.5). Probably same technique could help
for java. Some portion of the time belongs to the projects too. After
reducing java&projects part, we can revisit editor (or e.g. win sys,
which seem to have also some space for improvement).
Comment 2 Tomas Pavek 2003-05-30 16:09:36 UTC
Created attachment 10531 [details]
classes loaded during 1st java file open
Comment 3 Tomas Pavek 2003-05-30 16:10:18 UTC
Created attachment 10532 [details]
profiling snapshot of 1st java file opening;  "sampler" prof. method
Comment 4 Tomas Pavek 2003-05-30 16:11:56 UTC
Created attachment 10533 [details]
profiling snapshot  of 2nd java file open;  "sampler" prof. method
Comment 5 Tomas Pavek 2003-05-30 16:19:46 UTC
See also issue 27710 (in NB3.5, UI responsiveness of file opening was
solved mainly by editor and java module warm-up tasks, plus wait
cursor impl. in core). We should get close to NB 3.5 time (1.6 sec for
1st use).
Comment 6 Svata Dedic 2003-05-30 17:59:49 UTC
In NB-3.5, majority of time was spend in opening JARs (creating
JarFileSystems for them) from bootstrap classpath

The parser in NB-3.5 always used the NetBeans' runtime J2SDK for
bootstrap classes, or if configured so then the preconfigured (but a
single) set of JARs.
This is not true in Projects 4.0 -- each project can work with a
different JDK, so there's no clear decision on what should be warmed up.
By speculatively loading jars from Netbeans' own runtime, the startup
time may be even longer, if the project is configured to use a
different SDK.

If the warmup task executes _after_ the project system is initialized,
it can load the active project's bootstrap jars - I think that would
be a good approximation.
Comment 7 Jan Pokorsky 2003-11-26 16:34:09 UTC
The projects prototype has been canceled. For more details see
http://www.netbeans.org/servlets/ReadMsg?msgId=619519&listName=nbdiscuss