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 269121 - Breakpoints cause unneeded lengthy loading of projects
Summary: Breakpoints cause unneeded lengthy loading of projects
Status: NEW
Alias: None
Product: debugger
Classification: Unclassified
Component: Java (show other bugs)
Version: Dev
Hardware: PC Windows 7
: P2 normal (vote)
Assignee: Martin Entlicher
Depends on:
Reported: 2016-11-25 16:13 UTC by NukemBy
Modified: 2016-11-25 16:13 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description NukemBy 2016-11-25 16:13:14 UTC
I have a huge project whose load takes 2-3 minutes, of course I have some breakpoints set across its code and this causes hidden problems upon startup of NetBeans with completely different initial Project Group with tiny project, which should load pretty quicky (few seconds).

According to my observation, even with Project Group == 'none' JDPA during startup initialization ...
- goes through all breakpoints and source roots defined in '' ...
- this invokes 'ProjectManager.getDefault().findProject(f)' for each of them ...
- and implementation of findProject(...) is not actually 'find', it is rather 'try create and return the resulting Project if successful', as defined in JavaDoc comments here 
This means - project will be loaded even when it is not needed, method does not have flag "find only already loaded projects".

So, it appears with all these pieces together each time I start NetBeans I have to wait 2-3 minutes while it loads actually not needed projects, otherwise some actions just do not work. This is really annoying.

Below is the callstack (I'm using Gradle plugin):

"Asynchronous view model"
	at org.netbeans.gradle.project.NbGradleProjectFactory.loadProject(
	at org.netbeans.modules.projectapi.nb.NbProjectManager.createProject(
	at org.netbeans.modules.projectapi.nb.NbProjectManager.access$300(
	at org.netbeans.modules.projectapi.nb.NbProjectManager$
	at org.netbeans.modules.projectapi.nb.NbProjectManager$
	at org.netbeans.modules.openide.util.DefaultMutexImplementation.readAccess(
	at org.openide.util.Mutex.readAccess(
	at org.netbeans.modules.projectapi.nb.NbProjectManager.findProject(
	at org.netbeans.api.project.ProjectManager.findProject(
-->	at org.netbeans.api.debugger.jpda.LineBreakpoint$LineBreakpointImpl$LineGroupProperties.getProjects(
	at org.netbeans.modules.debugger.ui.models.BreakpointGroup.createGroups(
	at org.netbeans.modules.debugger.ui.models.BreakpointsTreeModel.getChildren(
	at org.netbeans.spi.viewmodel.Models$DelegatingTreeModel.getChildren(
	at org.netbeans.modules.debugger.jpda.ui.models.BreakpointsTreeModelFilter.getChildren(
	at org.netbeans.spi.viewmodel.Models$CompoundTreeModel.getChildren(
	at org.netbeans.spi.viewmodel.Models$CompoundModel.getChildren(
	at org.netbeans.modules.viewmodel.TreeModelNode$TreeModelChildren.getModelChildren(
	at org.netbeans.modules.viewmodel.TreeModelNode$
	at org.openide.util.RequestProcessor$
	at org.netbeans.modules.openide.util.GlobalLookup.execute(
	at org.openide.util.lookup.Lookups.executeWith(
	at org.openide.util.RequestProcessor$