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 184245 - Collecting project dependencies + scanning is too intrusive
Summary: Collecting project dependencies + scanning is too intrusive
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 6.x
Hardware: All All
: P3 normal with 1 vote (vote)
Assignee: Jesse Glick
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2010-04-15 09:35 UTC by Petr Jiricka
Modified: 2010-10-14 15:04 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 Petr Jiricka 2010-04-15 09:35:29 UTC
1. Check out the GlassFish project per instructions here:
http://wiki.glassfish.java.net/Wiki.jsp?page=V3FullBuildInstructions
I.e. check out the v3 workspace: svn checkout
https://svn.dev.java.net/svn/glassfish-svn/trunk/v3
Build the project from the command line
2. Open the top-level project in NetBeans. 
You will see that a "Collecting project dependencies" progress bar will run for about 3.5 minutes. This is not super-fast, but for the first time it is acceptable.
3. Open one of the subprojects, e.g. ejb/ejb-container
4. Open the pom.xml file of this project and modify it, e.g. add the following dependency:
     <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.8.1</version>
        </dependency>

=> You will see that the "Collecting project dependencies" + source scanning will run again. I tried several times, and the times were between 45 seconds and 2 minutes, which I think is too much. I would expect this to take <10 seconds, ideally <3 seconds.

5. Restart the IDE

=> After the restart, "Collecting project dependencies" ran again for 3.5 minutes. I think this should be much shorter, e.g. 20 seconds. Scanning itself is pretty fast (<30 seconds).

I am filing this as a P3 bug, but possibly it may even be a P2.
Comment 1 Antonin Nebuzelsky 2010-10-14 15:04:38 UTC
I followed the described procedure in 6.9.1 and in current trunk.

I confirm the intensive "Collecting project dependencies" task in all cases in 6.9.1. In trunk this task was almost instant for me. The improvement is a combination of the performance improvements introduced after 6.9.1 - I guess in this case mainly Jesse's rewrite of MavenFileOwnerQueryImpl. I saw the old impl in thread dumps a lot when going through the procedure in 6.9.1. Also native listening for FS changes plays a role here. When some task takes such a long time, user tends to go out of the IDE and back to it several times. In 6.9.1 it repeatedly triggered FS rescan and made the other tasks even slower. 

Closing fixed.