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 140680 - Skip class file time-stamp checking for unchanged src roots
Summary: Skip class file time-stamp checking for unchanged src roots
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Pavel Flaska
URL:
Keywords:
Depends on:
Blocks: 108159 133796
  Show dependency tree
 
Reported: 2008-07-18 09:11 UTC by Pavel Flaska
Modified: 2008-08-18 17:04 UTC (History)
0 users

See Also:
Issue Type: TASK
Exception Reporter:


Attachments
Patch (10.88 KB, text/plain)
2008-07-18 10:22 UTC, Pavel Flaska
Details
Updated patch #1 (11.28 KB, patch)
2008-07-24 09:26 UTC, Pavel Flaska
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Flaska 2008-07-18 09:11:17 UTC
As discussed with java/editor team, we should try to prevent timestamp checks of class files for unchanged source roots.
See section up-to-date check: http://wiki.netbeans.org/JavaScanDesc. It shows maximum improvement when no changes were
done in source roots.

How it works:
During the source root scanning, it collects java file names and its timestamps. When it is finished, md5 is computed
from collected data and stored in attributes.properties file in appropriate index directory. When already stored, it
compares the computed and stored digest. If they are the same, it skips listing and timestamp checking of class files.
Moreover, the source level is part of digest computation to allow rescanning when source level for a root is changed.
Comment 1 Pavel Flaska 2008-07-18 10:22:36 UTC
Created attachment 64939 [details]
Patch
Comment 2 Pavel Flaska 2008-07-24 09:21:59 UTC
Honza Pokorsky has found that when sources are opened in editor, after restart they are incorrectly underlined. This is
because of usages index was not initialized. Adding initialization of index should help. (Tomas Z.)
Comment 3 Pavel Flaska 2008-07-24 09:26:35 UTC
Created attachment 65497 [details]
Updated patch #1
Comment 4 Pavel Flaska 2008-07-31 11:24:23 UTC
Applied.
changeset a15dd771a170 in main
Comment 5 Quality Engineering 2008-07-31 15:50:15 UTC
Integrated into 'main-golden', available in build *200807311401* on http://bits.netbeans.org/dev/nightly/
Changeset: http://hg.netbeans.org/main/rev/a15dd771a170
User: Pavel Flaska <pflaska@netbeans.org>
Log: #140680: Skip class-file timestamp checking when no needed. Test included.
Comment 6 _ moser 2008-08-18 17:04:52 UTC
A similar technique could be used to avoid scanning of dependent projects when external libraries have changed: save a
checksum of an Public-API listing of an external lib (as provided e.g. by javap). If unchanged skip recompiling/scanning
dependent projects and sources.

Frank-Michael