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 52611 - Showing hidden navigator window invokes parsing each time
Summary: Showing hidden navigator window invokes parsing each time
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Navigation (show other bugs)
Version: 4.x
Hardware: PC Linux
: P2 blocker (vote)
Assignee: David Simonek
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2004-12-17 14:45 UTC by Antonin Nebuzelsky
Modified: 2005-08-12 13:14 UTC (History)
2 users (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 Antonin Nebuzelsky 2004-12-17 14:45:34 UTC
When you hide the navigator window, parsing is
started each time you show the window although the
activated node nor its file's contents does not
change between hiding and showing the navigator
window.
Comment 1 Antonin Nebuzelsky 2004-12-23 11:07:03 UTC
In contrast to issue 52609 I think in this case the caching is needed.
When you show the hidden navigator window you expect to see its
contents immediately, without the need to wait for its contents being
populated. At least in the case the activated node did not change
since the navigator was visible last time.
Comment 2 _ tboudreau 2004-12-30 19:36:07 UTC
Well, we're not talking about caching here, we're talking about whether the Navigator 
should update itself when it's not on the screen.  In other words, even when not showing, 
should it be updating its contents on every activated node change.
Comment 3 Antonin Nebuzelsky 2005-01-03 12:16:12 UTC
I don't think navigator should update itself when it's not visible. It
would be just waste of resources on the parsing.

Neither IMHO it should update itself WHEN the navigator is made from
invisible to visible AND the activated node didn't change in the
meantime (since the last time navigator was visible).
Comment 4 _ tboudreau 2005-01-06 02:56:20 UTC
> Neither IMHO it should update itself WHEN the navigator is made from
> invisible to visible AND the activated node didn't change in the
> meantime (since the last time navigator was visible).

That's a vanishingly small percentage of the time...and if the file has changed since it was 
hidden, it will either will have to update itself, or it will be wrong.

(ignore the fact that the text *says* "parsing" - it just means that the code that builds a list 
of elements has not yet run on a low priority thread).  Either it updates all the time when 
it's offscreen, or it updates when it is shown and while it's visible (which is what it 
currently does).  In which case it will say "parsing" - unless you want it to block AWT while 
it populates...
Comment 5 David Simonek 2005-01-19 12:39:36 UTC
I decided to update Navigator even when it is offscreen. The reasons
are: first much better responsiveness in sliding mode and second also
fix of 53063, 53126.
I think we can go further in optimizing the strategy of loading the
content into navigator when hidden in sliding mode. Something like
"wait 1 sec after node change when in sliding mode, and start loading
in background thread only after that time".
But IMO current fix is enough for now, for pleasant usage of Navigator
is sliding mode.

/cvs/objectbrowser/navigator/src/org/netbeans/modules/navigator/Navigator.java,v
 <--  Navigator.java
new revision: 1.15; previous revision: 1.14