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 50545 - Expensive JspRunToCursorActionProvider
Summary: Expensive JspRunToCursorActionProvider
Status: CLOSED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Debugger (show other bugs)
Version: 4.x
Hardware: PC All
: P3 blocker (vote)
Assignee: Martin Grebac
URL:
Keywords: PERFORMANCE
Depends on:
Blocks: 49990
  Show dependency tree
 
Reported: 2004-10-18 11:00 UTC by _ rkubacki
Modified: 2006-03-24 10:06 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 2004-10-18 11:00:07 UTC
JspRunToCursorActionProvider is listening to too
many changes - MainProjectManager,
TopComponent.Registry, DebuggerManager. This means
it updates its enabled/disabled state every time
when an event arrives including every notification
about TC opening and similar.

In my testcase with 4 Java editors opened I see it
being invoked 12 times during startup.
Comment 1 Martin Grebac 2004-10-18 12:14:47 UTC
Is the behaviour the same as in
org.netbeans.modules.debugger.projects.RunToCursorAction ?
Comment 2 Martin Grebac 2004-10-18 13:32:55 UTC
Well, I think I can't remove any of the listeners, but I probably do
not have to update the state on 'opened' events - activated should be
sufficient. I could remove the mime checking, too, and check just the
extension in-place - the mime checking does nothing more, actually.
But then the flexibility of the code (where mime is defined in one and
only one place) is lost. Any suggestions are welcome.
Comment 3 Martin Grebac 2004-10-18 14:07:03 UTC
I return immediately on opened events, so I think the action provider
shouldn't be expensive now:
http://web.netbeans.org/source/browse/web/jspdebug/src/org/netbeans/modules/web/debug/actions/JspRunToCursorActionProvider.java.diff?r1=1.6&r2=1.7
Comment 4 Jiri Skrivanek 2005-12-14 14:31:28 UTC
Seems to be fixed.