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 46724 - Classpath scan upon NetBeans start
Summary: Classpath scan upon NetBeans start
Status: RESOLVED WONTFIX
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 4.x
Hardware: PC Windows ME/2000
: P3 blocker (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-29 07:48 UTC by tkellerer
Modified: 2007-09-26 09:14 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 tkellerer 2004-07-29 07:48:16 UTC
why does NetBeans rescan my complete classpath
during startup?

The jars in my project usually don't change, and
waiting until NB comes up with a full set of
struts and other J2EE related jars takes nearly a
minute on my 1.8Ghz computer. 

Wouldn't it be enough to store a checksum for each
file, and compare that checksum when starting NB?
Comment 1 Jan Lahoda 2004-07-29 09:07:44 UTC
The scanning is done by java/javacore module (I think).
Comment 2 Martin Matula 2004-07-29 09:35:11 UTC
There is a difference between the initial scan and up-to-date check.
The initial scan takes more time and should happen only once per
codebase per any number of runs of the IDE with the same userdir.
The up-to-date check is similar to what you suggest - in fact it is
even simpler - it just checks timestaps of files (no checksum) and
updates the metadata only if the timestaps differ. For jar files we
check just the timestamp of the jar file, so it should be really fast.
Besides that we are deserializing class indexes which may take some
time (for src.zip and rt.jar together it takes about 1 second on my
1.7Ghz laptop).
In case you get the initial scanning all the time, then this may be
caused by the fact that you either delete userdir or
userdir/var/cache/mdrstorage after each run or you do not shutdown
netbeans properly (you do a Ctrl-C or kill the process) - in this case
the storage caches are not flushed, the indexes are not serialized
properly and they need to be rebuilt upon next run of the IDE.
Comment 3 Quality Engineering 2007-09-20 10:55:47 UTC
Reorganization of java component