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 16660 - Measure the amount of time spent in various listeners and the amount of them
Summary: Measure the amount of time spent in various listeners and the amount of them
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 3.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: _ rkubacki
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2001-10-17 18:24 UTC by Jaroslav Tulach
Modified: 2008-12-22 18:48 UTC (History)
0 users

See Also:
Issue Type: TASK
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jaroslav Tulach 2001-10-17 18:24:23 UTC
The listener model is suspicious of slowing down the whole IDE. Would it be
possible to measure the amount of time spent in firing various events and the
count of whole listeners created in the IDE?

Before that we can hardly redesign things to work better and faster.
Comment 1 Jaroslav Tulach 2001-10-17 18:52:25 UTC
There was a discussion on nbdev which contained a lot of useful ideas:


http://www.netbeans.org/servlets/BrowseList?listName=nbdev&by=thread&from=7740
Comment 2 Petr Nejedly 2001-10-19 09:22:48 UTC
I'll look at it.
Measuring created events is simple, measuring fire counts
is a bit harder. I can't easily measure number of listeners created
as they are mostly interfaces.
I think I can count attaching though/
Comment 3 Jan Chalupa 2001-11-27 13:03:02 UTC
Target milestone -> 3.3.1.
Comment 4 Marek Grummich 2002-07-22 11:19:35 UTC
Set target milestone to TBD
Comment 5 Marek Grummich 2002-07-22 11:22:08 UTC
Set target milestone to TBD
Comment 6 Petr Nejedly 2004-04-08 15:51:36 UTC
More of your charter now, I guess.
Comment 7 _ rkubacki 2006-08-08 10:46:04 UTC
Done repeatedly using various approaches. IIRC original complain was about
cascading processing of events in series where we can have certain overhead to
run the code to notify listeners.

The bigger problem is if we are listening to inappropriate events and perform
some  actions when these are fired. Reasons for this can include refiring of
events (some patterns of this type were fixed long time ago between DOs and node
by Hrebejk for example). Another can be listening to change in activated nodes +
winsys registry + editor registry. 

Yet another problem of heavy use of listeners is that this makes it more
difficult to ensure correct lifecycle of object and sometimes we are forced to
use weak listeners (more object involved, more processing to redispatch events,
slower GC). Generaly observable (and usualy mutable) objects tends to live for a
longer time. Representing the state of system with immutable objects means more
queries to get dynamically created data and less static data with listeners
attached to them.