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 45040 - All opened Java forms are parsed during startup
Summary: All opened Java forms are parsed during startup
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 4.x
Hardware: PC All
: P2 blocker (vote)
Assignee: Milos Kleint
URL:
Keywords: PERFORMANCE
Depends on:
Blocks: 44105
  Show dependency tree
 
Reported: 2004-06-16 17:23 UTC by _ rkubacki
Modified: 2008-12-22 19:45 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
stack trace from AST building (6.12 KB, text/plain)
2004-06-16 17:28 UTC, _ rkubacki
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ rkubacki 2004-06-16 17:23:43 UTC
dev build from Jun16. 

Every form file that is opened in editor is scaned
during start and ASTree are created for it. There
are more problems with the form loading.

The use of source hierarchy should be avoided and
information can be obtained directly from MDR
bypassing the bridge that may perform more work
than neceseary.

Do we really need to load the form completely
during IDE even if the component is not active?
Cf. Java editor that does not do this and load the
source lazily.
Comment 1 _ rkubacki 2004-06-16 17:28:28 UTC
Created attachment 15781 [details]
stack trace from AST building
Comment 2 Tomas Pavek 2004-06-22 10:02:07 UTC
This is a multiview issue - MultiviewTopComponent asks for the form
designer element when opened, so form must be loaded. Could MVTC defer
element creation until activated?
Comment 3 Milos Kleint 2004-06-22 10:13:03 UTC
i'm not sure it's possible to do that..when you split the editor and
put 2 forms next to each other, only one will be activated and the
other will be only visible.
with the change you propose, the one that is not activated will not
show anything, until activated.

BTW you can try to do it yourself. you get the
showing/activated/deactivated callbacks in your element, so you can
have only skeleton visual component on open, and later on
componentActivated() callback do the loading of the form.

Comment 4 Tomas Pavek 2004-06-22 10:43:19 UTC
If the MultiViewTopComponent is not able to recognize whether it is
visible, how can know it an element inside it??

Does anybody know how this is done in editor? I.e. how does it know
when to load the document - if TopComponent.activated is not usable?
Comment 5 Tomas Pavek 2004-06-22 11:53:16 UTC
> when you split the editor and put 2 forms next to each other, only
> one will be activated and the other will be only visible.

But you can actually check for selected component (instead of
activated), can't you?
Comment 6 Milos Kleint 2004-06-24 13:44:24 UTC
CloneableEditor class (the Source element component) does use the
componentShowing() for initialization of the document. Why cannot you
do it the same way for formdesigner?

I'd rather have everyhting setup and delegating correctly once the
MVTC is thrown into the winsys and everyone can access it.

eg. projects when closing a project iterate all the opened editor
documents and check if the dataobject belongs to the project or not.
without proper delegation at this point, the MVTC won't get closed.
Most probably more usecases like that.
Comment 7 Tomas Pavek 2004-06-24 15:27:54 UTC
Ok, in such case we can do it on our side.
Comment 8 Jan Stola 2004-06-29 15:47:02 UTC
We postponed the form loading into the componentShowing() method
(as suggested by mkleint). Unfortunately this doesn't solve
this issue because multiview invokes componentShowing() from
MultiViewCloneableTopComponent.componentOpened(). Multiview should
invoke this method only if it is showing.

Problematic stack trace:

MultiViewPeer.showCurrentElement:228
MultiViewPeer.peerComponentOpened:178
MultiViewCloneableTopComponent.componentOpened:127
Comment 9 Milos Kleint 2004-06-30 08:07:11 UTC
ok, I've fixed the MultiViewPeer stuff not to call componentShowing on
elements when the multiview component itself is only opened.
thanks for catching it.

Comment 10 Zdenek Konecny 2005-07-22 11:38:11 UTC
Closed