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 123410

Summary: Designer recomputes layout unnecessarily
Product: obsolete Reporter: Quy Nguyen <quynguyen>
Component: visualwebAssignee: Peter Zavadsky <pzavadsky>
Status: RESOLVED FIXED    
Severity: blocker Keywords: PERFORMANCE
Priority: P2    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description Quy Nguyen 2007-12-05 00:31:55 UTC
It appears that the visual designer recomputes page layouts in JsfTopComponent.designerShowing() when it may not be 
needed.  This occurs when the user has not made any modifications and switches to a page from another page or from the 
java/jsp tab to the design window.  Since this layout computation may take several seconds, depending on the 
complexity of the page, avoiding this could provide performance benefits.
Comment 1 Peter Zavadsky 2007-12-05 17:30:43 UTC
I need to investigate this. I know there is this recomputation. I think it is because when the designer is not selected
it doesn't listen on changes on model, and this way assures the changes are reflected. It seems this architecture is not
correct. There should be listening on the changes, and if they didn't happen, no relayout should be processed.
Comment 2 Peter Zavadsky 2008-01-16 19:15:30 UTC
Fixed, according to Sandip's advice (to check the state of the model).

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.105; previous revision: 1.104
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.57; previous revision: 1.56
done