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 65556 - Expensive refiring of change in EditorContextImpl
Summary: Expensive refiring of change in EditorContextImpl
Status: VERIFIED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Java (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@debugger
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2005-09-30 19:01 UTC by _ rkubacki
Modified: 2005-10-21 17:56 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 _ rkubacki 2005-09-30 19:01:28 UTC
EditorContextImpl in debugger listens to TopComponent.Registry and refires *all*
property changes to its listeners - ActionProviders. To make it worse it uses
pcs.firePropertyChange (null, null, null) so there is no chance to decide if the
change is important or not.

This affects startup as well as many actions in IDE - opening of editors,
navigating between nodes.
Comment 1 Martin Entlicher 2005-10-03 13:40:15 UTC
I agree that this is ugly. But it's risky to change without deep knowledge how
it's supposed to work.
Comment 2 _ rkubacki 2005-10-03 13:47:12 UTC
Sure. I know :-(
Comment 3 _ rkubacki 2005-10-03 14:36:18 UTC
And usual usecase is that listeners in turn ask EditorContext for current URL.
Would it be usefull to make it part of event notification?
Comment 4 Martin Entlicher 2005-10-04 11:12:46 UTC
We now fire EditorContext property change only when the Registry event is
ACTIVATED or CURRENT_NODES.
We also cache the current URL, Element and EditorCookie so that they do not have
to be recomputed multiple times.

Hope that this is sufficient:

/cvs/debuggerjpda/ant/src/org/netbeans/modules/debugger/projects/EditorContextImpl.java,v
 <--  EditorContextImpl.java
new revision: 1.19; previous revision: 1.18
Comment 5 _ rkubacki 2005-10-21 17:56:17 UTC
Seems to be heavily improved. I almost forgot about this class during last weeks.