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 201318 - Unnecessary scanning blocks IDE
Summary: Unnecessary scanning blocks IDE
Status: RESOLVED DUPLICATE of bug 177950
Alias: None
Product: java
Classification: Unclassified
Component: Project (show other bugs)
Version: 7.1
Hardware: PC Windows XP
: P3 normal (vote)
Assignee: Tomas Zezula
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2011-08-25 11:45 UTC by Peter Nabbefeld
Modified: 2011-09-19 09:03 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 Peter Nabbefeld 2011-08-25 11:45:20 UTC
I've cloned the main repository and started an IDE build. The clone is added to the "Favorites" tab. Only "nbbuild" is opened and one additional project which caused build problems.

After starting the build, the whole clone's projects are scanned, while this isn't what I'd want (as only two of the projects are open). The scanning runs in parallel to the build, making it slow (while the build also slows down the scanning ...).

This takes very long, making everything depending on non-scanning (like updating hints) to be blocked.

Non-opened projects should either never be scanned, or at least with a very low priority (i.e. the scanning should *never* block any other activities).
Comment 1 David Strupl 2011-09-19 06:43:25 UTC
I guess you are aware of these pages:

http://wiki.netbeans.org/FaqScanningAndIndexingPerformanceHints#Java_compilation_errors_detection
http://wiki.netbeans.org/FaqScanningAndIndexingIssues

BTW I hope you are aware that even opening one project the IDE needs to have compiled all its dependencies to be able to show the errors. For some of the IDE projects almost the whole NB checkout is the dependency (unfortunately).

I am marking as incomplete since this report would need at least one log attached so we can see what (and maybe also why) something was scanned.
Comment 2 Tomas Zezula 2011-09-19 09:02:41 UTC
>Non-opened projects should either never be scanned.
Which is not true in the NB project system. The project has 3 states: unknown, loaded, opened.
Even the loaded project has to be scanned if there is a dependency on it from opened project otherwise the IDE will not know the used types from dependent modules. Unfortunately nearly all nb module depends by test on huge set of modules.

There is a issue #177950 which requires that only one level of dependencies is scanned. For NB project system which does not support transitive dependencies i should be enough. But there are some consequences.
1st) Only the project classes + 1 level of dependencies are available on Go To Type when you open project (the rest is not scanned).
2nd) Scan is triggered by navigation (when you Ctrl+Click on some element from dependent project) you actually move 1 level deeper in dependencies and you need to scan this project dependencies in addition to this you also need to rescan the dependent project to fix the errors.
3rd) Comes from point 2. In worse case each project except of the top level project and list projects needs to be scanned twice.
So it's not sure that implementing it will make the IDE better but it should be at least prototyped.
Comment 3 Tomas Zezula 2011-09-19 09:03:59 UTC
Marking as duplicate of #177950

The additional module is in NB repository?
If so can you add them module name? I will look at the transitive deps.
Thanks

*** This bug has been marked as a duplicate of bug 177950 ***