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 124931

Summary: At IDE startup, all VW pages modeled
Product: obsolete Reporter: John Baker <jbaker>
Component: visualwebAssignee: _ sandipchitale <sandipchitale>
Status: VERIFIED FIXED    
Severity: blocker Keywords: PERFORMANCE
Priority: P2    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 123537    

Description John Baker 2008-01-09 03:04:33 UTC
When IDE is started and projects with pages opened   (project opened settings persisted from previous IDE shutdown)
then it seems all pages are modeled.  I think the Designer requests modeling to occur for all open pages.

This slows down IDE at startup and IDE is unusable until modeling has completed.

Instead, it would seem better (for performance reasons) to only have the activated page to be modeled.
Other pages would be modeled on-demand (only when the user chooses to make them active)

I think it makes sense to change the request to model only activated pages
Comment 1 John Baker 2008-01-09 03:31:48 UTC
Here is one use case

1) Create a new VW project and add some components to the page
2) repeat  (now 2 projects)
3) Save all and exit IDE
4) Restart 

 IDE starts but there is a delay after IDE opens (cannot expand project nodes, select menus or click page tabs in Designer

The start page is the activated page after the IDE has completed startup, while each page from the other project
has opened but not active.

Suggested Fix:
Instead of modeling the two pages at startup, only model each page when it is clicked




Comment 2 Peter Zavadsky 2008-01-09 16:35:16 UTC
The not showing pages shouldn't be modeled (unless requested by something else).
I am not sure whether display name request also won't cause model to load (to show it in the tab, need to check too - I
hope that not).
Comment 3 Peter Zavadsky 2008-01-12 00:04:36 UTC
First part of the fix:
Checking in visualweb/designer/jsf/src/org/netbeans/modules/visualweb/designer/jsf/JsfForm.java;
/cvs/visualweb/designer/jsf/src/org/netbeans/modules/visualweb/designer/jsf/JsfForm.java,v  <--  JsfForm.java
new revision: 1.104; previous revision: 1.103
done
Checking in visualweb/designer/jsf/src/org/netbeans/modules/visualweb/designer/jsf/ui/JsfTopComponent.java;
/cvs/visualweb/designer/jsf/src/org/netbeans/modules/visualweb/designer/jsf/ui/JsfTopComponent.java,v  <-- 
JsfTopComponent.java
new revision: 1.56; previous revision: 1.55
done

Now the designer/jsf will request the model only when first time componentShowing called (i.e. not from TC constructor,
also not from JsfForm creation).

It still seems to be not enough. The other models seems to be modeled by insync when just one was requested, passing there.
Also there is needed better API from insync, currently only informs about model set loading (which is not needed), and
not about individual models, which is needed.
Comment 4 _ sandipchitale 2008-01-12 01:43:20 UTC
Well the modeling meaning creation of FaceModel does happen at the startup. But that is a light weight process. The
question is does syncing happen for pages that are not visible to the user.
Comment 5 _ sandipchitale 2008-01-14 21:10:00 UTC
As I said in earlier comment the creation of FacesModels should and does happen when any service from Insync is called.
The creation of FacesModels itself is not expensive. The syncing is what is expensive. I have verified that the syncing
is only called on pages that are open. This in turn results in syncing of Request, Session and Application beans also
because those are shown in the outline.

Marking as fixed.
Comment 6 John Baker 2008-01-16 00:01:10 UTC
Now, in 6.1 Startup and using IDE with multiple projects and pages opened is tremendously faster