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 183405

Summary: Scanning is initiated after a simple clean or build of web project
Product: java Reporter: Petr Jiricka <pjiricka>
Component: SourceAssignee: Jan Lahoda <jlahoda>
Status: RESOLVED FIXED    
Severity: normal Keywords: PERFORMANCE
Priority: P2    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: Attaching the log file as requested.

Description Petr Jiricka 2010-04-02 13:36:13 UTC
1. Create a web application
2. Build it
3. Clean it

Notice that after both build and clean, there is brief scanning in the progress bar. This should not happen - sources have not changed, so there is no reason to scan them. 
This does not happen for Java SE applications.
Comment 1 Vitezslav Stejskal 2010-04-15 11:24:24 UTC
A log file please. The one with -J-Dorg.netbeans.modules.parsing.impl.indexing.RepositoryUpdater.level=FINE. Thank you
Comment 2 Petr Jiricka 2010-04-15 11:50:31 UTC
Created attachment 97437 [details]
Attaching the log file as requested.

Thank *you*.
Comment 3 Jan Lahoda 2010-04-15 15:08:01 UTC
I believe that the problem is that the build/generated-sources/ap-source-output are scanned, although the same data are gathered from the annotation processors. I originally tried to solve that by not including it on the source path (that is why it does not occur for J2SE projects in simple case), but that still fails in more complicated cases. I think we will need some way of filtering source roots - the filtered source roots would be simply ignored by the indexing API.
Comment 4 Jan Lahoda 2010-04-23 10:57:30 UTC
Appears that the filtering is too difficult and too dangerous. So, removing the ap-source-output from the SourceForBinaryQuery, which should work reasonably well (also needs to be removed from the automatic timestamp refresh that is done on clean build):
http://hg.netbeans.org/jet-main/rev/73859d15c0fb
Comment 5 Quality Engineering 2010-04-24 05:26:41 UTC
Integrated into 'main-golden', will be available in build *201004240200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/73859d15c0fb
User: Jan Lahoda <jlahoda@netbeans.org>
Log: #183405: not including the annotation processing source output in the results of SourceForBinaryQuery, as the content of the Java infrastructure cache should be used instead.
Also preventing timestamp refresh of this folder on clean&build.