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 217341 - JSF Page controller model loads in AWT thread
Summary: JSF Page controller model loads in AWT thread
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: JSF (show other bugs)
Version: 7.3
Hardware: All All
: P3 normal (vote)
Assignee: Martin Fousek
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2012-08-24 05:59 UTC by misterm
Modified: 2012-10-31 02:54 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 191805


Attachments
nps snapshot (157.89 KB, application/nps)
2012-08-24 06:00 UTC, misterm
Details

Note You need to log in before you can comment on or make changes to this bug.
Description misterm 2012-08-24 05:59:57 UTC
This bug was originally marked as duplicate of bug 204067, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related.

Build: NetBeans IDE Dev (Build 20120823-6947d3b2ad09)
VM: Java HotSpot(TM) 64-Bit Server VM, 21.1-b02, Java(TM) SE Runtime Environment, 1.7.0_01-b08
OS: Windows 7
Maximum slowness yet reported was 6255 ms, average is 6255
Comment 1 misterm 2012-08-24 06:00:00 UTC
Created attachment 123503 [details]
nps snapshot
Comment 2 Svata Dedic 2012-10-23 06:56:01 UTC
First to note, the snapshot captures IDE startup. Most of the threads are slowed down because of classloading. Some threads are still waiting on project load.

JEE JSF PageFlowController initializes in AWT thread, and attempts to load the config model = XML parsing + classloading.

The Load projects thread (which many other threads are waiting for to complete) is computing j2ee.ProjectHookImpl.getEEversion(). Consider offloading the EE project initialization to a separate request processor - if possible. The EE version is used for logging !
Comment 3 Martin Fousek 2012-10-23 07:10:07 UTC
I didn't see the snapshot yet, but the PageFlow is my area -> reassigning.
Comment 4 Martin Fousek 2012-10-30 14:36:07 UTC
So there are two problematic places one in the maven.j2ee which I fixed since the change made sense, was easy and straightforward. Martine please take a look on that, but I believe that you will agree with it:
web-main #54cb98bcb53d

The second one was in the web.jsf.navigation. I moved expensive PageFlowController initialization from the AWT EDT to the background thread. The UI doesn't freeze anymore (by opening complex files) and users just has to wait for completed loading of the page flow model (indicated in the status bar).
web-main #2b5236c1c068
Comment 5 Martin Janicek 2012-10-30 14:47:00 UTC
It looks beautiful, thanks Martine
Comment 6 Quality Engineering 2012-10-31 02:54:45 UTC
Integrated into 'main-golden', will be available in build *201210310001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/54cb98bcb53d
User: Martin Fousek <marfous@netbeans.org>
Log: #217341 - JSF Page controller model loads in AWT thread #1