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 24440 - OpenedWindowsAction loads/instatiates closed windows
Summary: OpenedWindowsAction loads/instatiates closed windows
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 3.x
Hardware: Sun Solaris
: P2 blocker (vote)
Assignee: mslama
URL:
Keywords: PERFORMANCE
Depends on:
Blocks: 24329
  Show dependency tree
 
Reported: 2002-06-05 14:57 UTC by Petr Nejedly
Modified: 2008-12-23 09:19 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Suggested patch (1.24 KB, patch)
2002-06-06 15:43 UTC, Peter Zavadsky
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Nejedly 2002-06-05 14:57:40 UTC
It takes too long then to show Window menu,
which contain that action, for the first time.

Also, in the builds with the new Welcome Panel,
it loads the (closed) WelcomePanel instance
as well, prolonging the menu invocation time
by ~8s.
Comment 1 Petr Nejedly 2002-06-05 15:13:48 UTC
One more odity:
If I close the Welcome Panel, switch to GUI edititng, shutdown the
IDE, start it again and open a form, the WP gets loaded and
instantiated (even twice in my case).
Comment 2 Peter Zavadsky 2002-06-06 15:43:02 UTC
Created attachment 6125 [details]
Suggested patch
Comment 3 Peter Zavadsky 2002-06-06 15:46:13 UTC
I guess problem is not instantiating WelcomeTopComponet, but that it
GUI is inited in constructor, the method componentShowing should be
used for that purpose. I suggest the fix (see attachment).

Reassigning.
Comment 4 Petr Nejedly 2002-06-06 16:18:02 UTC
No, that is not the problem.
Even if I disable the Welcome module, Window menu takes ~2s
to show the first time, which is caused by the fact that
OpenedWindowsAction loads all the components for the workdspace.

It is only more visible with Welcome module as its TC is very
slow to initialize for the first time.
Comment 5 Peter Zavadsky 2002-06-06 16:55:04 UTC
OK, you want to save the deserialization time also.

I don't see a simple way now to do it, unless we will create some
lightweight  TC delegates keeping just name, icon etc. of the TC itself.

Marek what do you think about it, you know much more about how the TC
loading.
Comment 6 mslama 2002-06-06 17:04:18 UTC
What about to create workspace submenu when it is needed? So do not
create submenus for all workspaces at once. The problem is that we use
ModeImpl.isOrphan() to decide if mode should be added to menu or not.
It causes loading of all top components. Not sure if we can use some
other condition.
Comment 7 mslama 2002-06-06 17:12:03 UTC
Maybe we could use ModeImpl.isHidden() instead of ModeImpl.isOrphan().
isHidden loads just mode properties not components. When mode is
hidden all top components in mode are closed. I think (hope) it is
exactly what we need. Need to check how it works for dynamicaly
created mode eg.Options when it is closed.
Comment 8 mslama 2002-06-19 15:04:47 UTC
Fixed as suggested. ModeImpl.isHidden() is used instead of
ModeImpl.isOrphan() to avoid loading of top components. I had to fix
status of output and properties modes in form module to hidden.
(Status was not set and default is visible.)

Modified:
src/org/netbeans/core/actions OpenedWindowsAction.java r.1.44
Comment 9 Petr Nejedly 2002-06-19 15:29:13 UTC
Great
Comment 10 Quality Engineering 2003-07-01 16:21:21 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.