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 149554

Summary: org.netbeans.modules.projectimport.eclipse.core classes are loaded during startup with LimeWire project
Product: projects Reporter: Alexander Kouznetsov <mrkam>
Component: Eclipse project importerAssignee: Jesse Glick <jglick>
Status: RESOLVED FIXED    
Severity: blocker CC: issues, jtulach
Priority: P3 Keywords: PERFORMANCE, TEST
Version: 6.x   
Hardware: PC   
OS: Windows XP   
URL: http://wiki.netbeans.org/FitnessViaWhiteAndBlackList
Issue Type: DEFECT Exception Reporter:
Attachments: Stacktraces

Description Alexander Kouznetsov 2008-10-08 20:14:30 UTC
Performance whitelist test reports that following classes are loaded during NetBeans startup with LimeWire project:

org.netbeans.modules.projectimport.eclipse.core.EclipseProjectReference
org.netbeans.modules.projectimport.eclipse.core.ImportProblemsPanel
org.netbeans.modules.projectimport.eclipse.core.ProjectOpenHookImpl
org.netbeans.modules.projectimport.eclipse.core.ProjectOpenHookImpl$RunnableImpl
org.netbeans.modules.projectimport.eclipse.core.UpdateAllProjects
org.netbeans.modules.projectimport.eclipse.core.UpdateProjectAction
org.netbeans.modules.projectimport.eclipse.core.UpgradableProject
org.netbeans.modules.projectimport.eclipse.core.WorkspaceFactory
org.netbeans.modules.projectimport.eclipse.core.spi.UpgradableProjectLookupProvider

Please don't load these classes unless they are really necessary. More information about the test available via the URL
specified.

Comment from jtulach: 
Imho, it is not correct to initialize EclipseCode until one really uses the 
Eclipse Import wizard...
Comment 1 Alexander Kouznetsov 2008-10-08 20:16:55 UTC
Created attachment 71405 [details]
Stacktraces
Comment 2 David Konecny 2008-10-08 20:28:43 UTC
EclipseImport code is not loaded during IDE startup. It's loading is triggered by a project opening - a project is
checked if it was imported from Eclipse and if so then synchronization with Eclipse project is scheduled to occur 10
seconds later.

What do you suggest?
Comment 3 Antonin Nebuzelsky 2008-10-10 10:20:34 UTC
TM=future, too late for a P3 in 6.5
Comment 4 Jesse Glick 2009-06-09 19:56:01 UTC
Some improvement already made for 6.7 in 23a442bff758. Can further reduce overhead to 3 classes when unused: core-main
#57d32e35e89e
Comment 5 Jaroslav Tulach 2009-06-10 08:22:16 UTC
Btw. You can add these classes into ide.kit/test/qa-functional/data/blacklist.txt to verify they never get loaded.
Comment 6 Quality Engineering 2009-06-11 08:55:06 UTC
Integrated into 'main-golden', will be available in build *200906110201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/57d32e35e89e
User: Jesse Glick <jglick@netbeans.org>
Log: #149554: reduce startup class loading overhead to three classes when imported projects are not open.
Comment 7 Jesse Glick 2009-06-12 01:39:13 UTC
Not sure how to do that. After adding
org.netbeans.modules.projectimport.eclipse.core.spi.UpgradableProjectLookupProvider, which _is_ still loaded,
GeneralSanityTest still passes. Desired patch is something like

diff --git a/ide.kit/test/qa-functional/data/blacklist.txt b/ide.kit/test/qa-functional/data/blacklist.txt
--- a/ide.kit/test/qa-functional/data/blacklist.txt
+++ b/ide.kit/test/qa-functional/data/blacklist.txt
@@ -413,3 +413,16 @@
 org.netbeans.modules.db.explorer.node.RootNode
 org.netbeans.modules.hudson.ui.nodes.HudsonRootNode
 org.netbeans.modules.bugtracking.ui.nodes.BugtrackingRootNode
+
+# #149554
+org.netbeans.modules.projectimport.eclipse.core.EclipseProjectReference
+org.netbeans.modules.projectimport.eclipse.core.ImportProblemsPanel
+org.netbeans.modules.projectimport.eclipse.core.ProjectOpenHookImpl
+org.netbeans.modules.projectimport.eclipse.core.UpdateAllProjects
+org.netbeans.modules.projectimport.eclipse.core.UpgradableProject
+org.netbeans.modules.projectimport.eclipse.core.WorkspaceFactory
+# This is unavoidable:
+# org.netbeans.modules.projectimport.eclipse.core.spi.UpgradableProjectLookupProvider
+# Also unavoidable unless quite fancy declarative context-sensitive actions were available:
+# org.netbeans.modules.projectimport.eclipse.core.UpdateProjectAction
+# org.netbeans.modules.projectimport.eclipse.core.UpdateProjectAction$Menu