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 21618 - Stop eager loading of TopComponents when not needed
Summary: Stop eager loading of TopComponents when not needed
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 3.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: Peter Zavadsky
URL:
Keywords: PERFORMANCE
Depends on:
Blocks: 19038
  Show dependency tree
 
Reported: 2002-03-15 10:40 UTC by Jaroslav Tulach
Modified: 2008-12-23 09:35 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jaroslav Tulach 2002-03-15 10:40:24 UTC
During investigation of different possibilities how to minimize the amount of
classes loaded into VM I have realized that RMIRefrshAction is loaded due to
initialization of Runtime tab. 

When the system starts the runtime tab is deserialized and inserted into AWT
hiearachy. This results in TreeView.addNotify () and that leads to
JTree.rootNode.expand which loads all nodes visible in RuntimeTab.

We have to prevent this for rumtimetab and also for editors sake.

The best place to hack this in seems to be the the initialization of
tabmodecontainer - deserialize the topcomponents but do not insert them into the
AWT hiearchy until really needed. When somebody switches to the tab, insert it
and call TopComponent.notifyOpened (). This shall work for TreeView and will
allow delayed implementation in Editor.

PS: Please also consider addition of TopComponent.notifyVisible () and
notifyNonvisible() to give components better handling of their visibility
state...
Comment 1 Peter Zavadsky 2002-05-10 15:28:58 UTC
Fixed in trunk.

New methods added to TopComponent:
protected void componentShowing()
protected void componentHidded()
(also were deprecated openNotify() and closeNotify() and replaced by
componentOpened(), componentClosed() ).

[ Also added managing methods to WindowManager:
protected void componentShowing(TopComponent)
protected void componentHidded(TopComponent) ]


See also issue #19038.

Comment 2 Jan Chalupa 2003-11-03 16:35:27 UTC
Previously RESOLVED issue that was mistakenly put into the NEW
state... closing again...
Comment 3 Marian Mirilovic 2004-03-01 08:52:51 UTC
issue doesn't apply to new window system - verified