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.
Created attachment 117542 [details] Patch ComponentWidgets are attached as sceneListeners via its ComponentSceneListener to the Scene and a Scene.validate() call notifies the ComponentSceneListener.sceneValidated() triggering ComponentWidget.addComponent(). ComponentWidget.addComponent() sets always the new calculated Bounds to the wrapped Component, even new Bounds are equal to current set Bounds. Inside Component.setBounds() there is no check to avoid subsequent setting with same Bounds and it will always end in a expensive recalculation hell. See Component.setBounds() code. Appended patch will avoid this call if there are no changes in new calculated Bounds. Index: ComponentWidget.java =================================================================== --- ComponentWidget.java (revision 159) +++ ComponentWidget.java (working copy) @@ -173,9 +173,12 @@ component.addComponentListener (componentListener); componentAdded = true; } - component.removeComponentListener (componentListener); - componentWrapper.setBounds(scene.convertSceneToView(convertLocalToScene(getClientArea()))); - component.addComponentListener (componentListener); + Rectangle newBounds = scene.convertSceneToView(convertLocalToScene(getClientArea())); + if (!newBounds.equals(componentWrapper.getBounds())) { + component.removeComponentListener (componentListener); + componentWrapper.setBounds(scene.convertSceneToView(convertLocalToScene(getClientArea()))); + component.addComponentListener (componentListener); + } component.repaint(); }