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 201241 - LowPerformance took 25520 ms. FilterNode.gteName -> loads MavenProject
Summary: LowPerformance took 25520 ms. FilterNode.gteName -> loads MavenProject
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 7.0
Hardware: All All
: P3 normal (vote)
Assignee: Milos Kleint
URL:
Keywords: PERFORMANCE
: 202215 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-08-23 09:09 UTC by Exceptions Reporter
Modified: 2012-04-17 14:15 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 174310


Attachments
nps snapshot (370.08 KB, application/nps)
2011-08-23 09:09 UTC, Exceptions Reporter
Details
nps snapshot (344.67 KB, application/nps)
2011-11-10 06:31 UTC, gerzhedowich
Details
screenshot (247.02 KB, image/png)
2012-03-21 06:49 UTC, Milos Kleint
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Exceptions Reporter 2011-08-23 09:09:35 UTC
Build: NetBeans IDE 7.0.1 (Build 201107282000)
VM: Java HotSpot(TM) 64-Bit Server VM, 20.1-b02, Java(TM) SE Runtime Environment, 1.6.0_26-b03
OS: Windows 7

User Comments:
GUEST: work with maven project

m_potociar: clicked on a link in the analyze stack window



Maximum slowness yet reported was 25520 ms, average is 10867
Comment 1 Exceptions Reporter 2011-08-23 09:09:50 UTC
Created attachment 110153 [details]
nps snapshot
Comment 2 gerzhedowich 2011-11-10 06:31:20 UTC
Created attachment 113067 [details]
nps snapshot
Comment 3 Milos Kleint 2012-03-21 06:49:53 UTC
Created attachment 116964 [details]
screenshot

filtrnode.getName triggers maven project loading
Comment 4 Milos Kleint 2012-03-26 15:59:07 UTC
http://hg.netbeans.org/core-main/rev/5c02ec1a8f02

the fix attempts to check if the loaded MavenProject instance is present (therefore the getOriginalMavenProject() will not hang in synchronized block) and if not, returns simple values from ProjectInformation implementation. A new RP task is spawned that enters the synchronized block and waits for the loading to finish. Then it fires property change event.
Comment 5 Jesse Glick 2012-03-28 00:14:35 UTC
I think the patch to Info is a bad idea. There are a bunch of callers of ProjectInformation for which blocking is not a big deal but getting an incorrect result is (they will not be listening to changes), e.g. Open Project dialog.

The actual slowness report involved just MavenProjectNode.getName() - so make that return something short when the project is not yet loaded. The Node is at a higher UI level so no one will care if it is sometimes wrong.
Comment 6 Milos Kleint 2012-03-28 06:33:04 UTC
(In reply to comment #5)
> I think the patch to Info is a bad idea. There are a bunch of callers of
> ProjectInformation for which blocking is not a big deal but getting an
> incorrect result is (they will not be listening to changes), e.g. Open Project
> dialog.
> 
> The actual slowness report involved just MavenProjectNode.getName() - so make
> that return something short when the project is not yet loaded. The Node is at
> a higher UI level so no one will care if it is sometimes wrong.

So what about just doing the workaround in case we are called in AWT?
Comment 7 Milos Kleint 2012-03-28 06:48:25 UTC
like this: http://hg.netbeans.org/core-main/rev/e9658e230490
Comment 8 Milos Kleint 2012-04-17 14:15:20 UTC
*** Bug 202215 has been marked as a duplicate of this bug. ***