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 177950 - Unnecessary rescanning of upstream dependencies
Summary: Unnecessary rescanning of upstream dependencies
Status: RESOLVED WONTFIX
Alias: None
Product: editor
Classification: Unclassified
Component: Parsing & Indexing (show other bugs)
Version: 6.x
Hardware: PC Linux
: P3 normal with 1 vote (vote)
Assignee: Tomas Zezula
URL:
Keywords: PERFORMANCE
: 169252 201318 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-12-01 13:12 UTC by Jesse Glick
Modified: 2016-07-07 07:30 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Things scanned after making two one-line changes to nbbuild/antsrc, which nothing else depends on, and anyway not changing any signatures (13.32 KB, text/plain)
2009-12-07 15:13 UTC, Jesse Glick
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2009-12-01 13:12:39 UTC
I had four module projects open, including apisupport.project and apisupport.refactoring. Having removed the .refactoring -> .project dep earlier, I now readded it. The IDE went into scanning. While I expected it to rescan apisupport.refactoring - I just changed its deps, so of course it needed to be rescanned - what surprised me was that dozens of other upstream modules were rescanned as well, e.g.

INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: Indexing of: file:/space/src/nb/core-main/openide.filesystems/src/ took: 1993 ms (New or modified files: 76, Deleted files: 0)

Why?? openide.filesystems was already a dep of all of the open projects, so it was certainly not being newly added to the set. Nor had I made any recent modifications to this module.
Comment 1 Jesse Glick 2009-12-01 16:59:25 UTC
Another scanning problem today: I had eight modules open, all scanning was finished. I had made some minor edits (not to metadata nor Java sources) and committed. I then closed all eight projects at once (File > Close). Some time later I noticed 100% CPU activity, and looking at NetBeans saw that it was busily scanning 173 source roots, which I presume to be the transitive dependency closure of those eight module projects - even though they were long since closed!
Comment 2 Jesse Glick 2009-12-07 15:12:16 UTC
And another problem: with nbbuild and several apisupport.* modules open, I committed minor text edits to a couple of nbbuild/antsrc/org/netbeans/nbbuild/*.java. (The edits had been made and saved a couple of minutes before.) The IDE then proceeded to rescan tons of source roots for no apparent reason.

While it is nice that the log file tracks tracks what was scanned, and how long it took, it gives no indication *why* scanning took place - which is a major gap, since the problem (in my experience) is usually not that scanning is too slow but that it should not have happened at all.
Comment 3 Jesse Glick 2009-12-07 15:13:27 UTC
Created attachment 92238 [details]
Things scanned after making two one-line changes to nbbuild/antsrc, which nothing else depends on, and anyway not changing any signatures
Comment 4 David Strupl 2009-12-17 07:26:10 UTC
This one is for Vita.
Comment 5 Vitezslav Stejskal 2009-12-18 05:58:38 UTC
Adding -J-Dorg.netbeans.modules.parsing.impl.indexing.RepositoryUpdater.level=FINE should provide more details.
Comment 6 Vladimir Voskresensky 2010-12-02 07:50:50 UTC
Tomas, any news about this issue?
I have very bad experience when in debug mode I apply changes in function (let's say in CharSequences.java which is part of openide.utils) and then 
1) Scanning takes a lot of time 
2) it prevent further use of jpda debugger (which depends somehow on java model?)
Comment 7 Tomas Zezula 2010-12-02 09:41:10 UTC
In Vladimirs case the dependencies are inverse. The IDE scans the classes which depends on public signature of the CharSequences to correct error badges. You can set the scope of the scan by Options/Editor/Hints/Dependency Scanning. If you did not changed a public signature of the CharSequences please create a new issue java.source and assign it to me as it has no much in common with this one. Thanks
Comment 8 Tomas Zezula 2011-09-19 09:03:59 UTC
*** Bug 201318 has been marked as a duplicate of this bug. ***
Comment 9 Tomas Zezula 2015-03-05 09:37:44 UTC
*** Bug 169252 has been marked as a duplicate of this bug. ***
Comment 10 Martin Balin 2016-07-07 07:30:58 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss