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 15495 - Performance: get property listener count for nodes
Summary: Performance: get property listener count for nodes
Alias: None
Product: platform
Classification: Unclassified
Component: Nodes (show other bugs)
Version: 3.x
Hardware: Sun Solaris
: P2 blocker (vote)
Assignee: Petr Hrebejk
Depends on:
Reported: 2001-09-14 00:19 UTC by Torbjorn Norbye
Modified: 2008-12-22 21:50 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description Torbjorn Norbye 2001-09-14 00:19:00 UTC
Performance: apis don't allow me to get at listener count
to turn off computation for unused node info. 

My properties window shows LOTS of information which is
costly to compute, so since it's not always shown, it's
a performance bug in my application that I can't do this
on-demand. So while this represents a change in an API and
not a bug per se, it's a performance bug that you can't
effectively do pull vs. push.

See the following nbdev e-mail for motivation (and the
thread for background info if needed).

Date: Mon, 3 Sep 2001 11:38:41 -0700 (PDT)
From: Tor Norbye <>
Content-Type: TEXT/PLAIN; charset=US-ASCII
Subject: Re: [nbdev] Push vs pull

 | > How do I know if my node properties are displayed anywhere???
 | Not sure if it really works, but if your Node does not have any
 | PropertyChangeListener attached, than its properties should not be
 | visible....

>From class Node:
 public final void addPropertyChangeListener (PropertyChangeListener l)
 So I can't write my own addPropertyChangeListener which does

Any chance this method can be unfinaled or do you have another
suggestion for how I can determine if there are any listeners?

(If you want to keep the method final for performance reasons,
perhaps you could add the counter to your own addPropertyChangeListener
and removePropertyChangeListeners, and then provide a hasListeners()
or numListeners() method.

-- Tor
Comment 1 Petr Hrebejk 2001-09-24 15:06:03 UTC
Just reasigning to me.
Comment 2 Petr Hrebejk 2001-10-08 15:39:29 UTC
Required method was added into the org.openide.nodes.Node class. Changes
were made so that calling this method hould give raonable results.
Comment 3 Quality Engineering 2003-07-01 16:02:53 UTC
Resolved for 3.4.x or earlier, no new info since then -> verified
Comment 4 Quality Engineering 2003-07-01 16:22:44 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.