Notes on configmgr2
      [ why is this so impossibly slow & inefficient ! ]

+ work on patches/test/configmgr-profile.diff:
	+ fixup tree-tests:
		+ act on profile:
		+ it's all the ~Reference<XNameAccess>
			that causes the pain ...

Observations
    + the UNO API mandates that everything must be thread-safe
	+ across 2 adjacent key access everything could change
	+ this is not what anyone wants

    + new API ?
	+ any = getStructure (path, type)
	    + 1 set of locking & iteration (?)
	    + getSubPath:

*** Performance ***
    + ~NotifierImpl - burns 56million instructions
	-> listenercontainer.hxx ...
	invariably has just 1 listener.
	    + created by ApiTreeImpl:
		+ m_aNotifier (new NotifierImpl(aTree))
	    + NotifierImplHolder:
		+ a vos::ORef<NotifierImpl>
		+ [ can it not smart-create ? ]


*** Notes ***

    + 2 types of 'tree' node:
	+ Group - presumably a normal node
	+ Set - presumably a simple list

    + Question:
	+ is it *really* worth screwing around with
	  this design ?
	+ generate some statistics.

*** API ***

**** UNO ****

container::XChild, container::XNamed, lang::XComponent,
configuration::XTemplateInstance, lang::XUnoTunnel
beans::XPropertySet, beans::XMultiPropertySet ...
util::XRefreshable, util::XFlushable, util::XStringEscape

  + source/
    + api2/
	+ elementaccess.hxx:
	    + BasicInnerElement: XChild, XNamed
	    + BasicSetElement: XChild, XNamed, XComponent
			       XTemplateInstance, XUnoTunnel
	    + BasicRootElement: XNamed, XComponent,
				XChangesNotifier, XLocalizable
	    + BasicUpdateelement: BasicRootElement, XChangesBatch
	+ groupaccess.hxx:
	    + BasicGroupAccess: XNameAccess, XHierarchicalName,
				XHierarchicalNameAccess, XContainer,
				XExactName, XProperty
	+ propertysetaccess.hxx:
	    + BasicPropertySet: XPropertySet, XMultiPropertySet,
				XHierarchicalPropertySet,
				XMultiHierarchicalPropertySet,
				XPropertyState, XMultiPropertyStates
	+ provider.hxx:
	    + OProvider: XMultiServiceFactory, XLocalizable,
			 XRefreshable, XFlushable
	+ setaccess.hxx:
	    + BasicSetAccess: XNameAccess, XHierarchicalName,
			      XHierarchicalNameAccess, XContainer,
			      XExactName, XProperty, XPropertySetInfo,
			      XTemplateContainer, XStringEscape

**** api2/configapi layer ****

    This is used by all the UNO wrappers, and features a much simpler
API, works on both NodeGroup & NodeSet node references
[NodeSetInfoAccess eg.]

	+ All operates on:
	    + configuration::Tree references

	+ apinodeaccess.cxx:
	    + makeElement
	    + makeUnoElement
	    + GuardedNodeAccess:
	+ accessimpl.cxx:
	    + implGetByName
		+ takes a GuardedNodeDataAccess lock.

	+ calls into 'configuration' API
	    ::configuration::getChildOrElement
	    ::configuration::validateAndReducePath
	    ::configuration::getDeepDescendant

	+ apifactory.cxx:
	    + configapi::Factory::
		+ makes UNO proxies for things

	+ apifactoryimpl.cxx:
	    + ReadOnlyObjectFactory::doCreateSetElement
		+ creates set elements.

	+ groupobjects.cxx:
	    + OSetElementGroupInfo

	+ apiaccessobj.hxx:
	    + OSetElement
		+ instantiates an ApiTreeImpl

	+ apitreeimplobj.cxx:
	    + ApiTreeImpl::ApiTreeImpl + ::init
	    + adds notifiers & all manner of gubbins

	+ notifierimpl.hxx
	    + 1 member: a SpecialListenerContainer

	+ listenercontainer.cxx
	    + manages XEventListener, XContainerListener,
	      XChangesListener, XPropertyChangeListener,
	      XVetoableChangeListener [etc.]
	      XPropertiesChangeListener
**	    + the vetoing - requires synchronous
	      listening (always?) ... 

	    typedef SpecialListenerContainer <SubNodeID,SubNodeHash,SubNodeEq,SubNodeToIndex> SpecialContainer;
	    ...
	    typedef cppu::OMultiTypeInterfaceContainerHelperVar< Key_,KeyHash_,KeyEq_ >	SpecialContainerHelper;
	    + Slowness via  OBroadcastHelperVar<> m_aSpecialHelper
	    	    + 100 elements ?
		    + default bucket count:
			+ we -usually- only use 1 element so ...

	+ cppuhelper/inc/cppuhelper/interfacecontainer.h
	    + OMultiTypeInterfaceContainerHelper
	    + interesting: can add / remove same thing
	      multiple times [ with a simple ref-count ? ]

	+ since each node has an (allocated) NotifierImpl anyway
	    + why not let the node track listeners itself ?
	    + far easier to find & manage surely ?

	+ what are in these buckets ?
	    + are there 100 buckets to clear (each?)
	    + 36million cycles

	+ NotifierImpl much loved by:
	    + broadcaster.cxx
	    + confignotifier.cxx
	    + apitreeimplobj.cxx

	+ void configmgr::configapi::NotifierImpl::add(const configmgr::configuration::NodeID&,
	       const com::sun::star::uno::Reference<com::sun::star::lang::XEventListener>&)
	    + called for every node [ for some reason ]


* Listener Impls *
	+ provider.cxx:
	    + OProviderDisposingListener
	    + implements XEventListener_BASE
	+ propertiesfilterednotifier.cxx:
	    + XPropertiesChangeListener,
	      XEventListener
	+ broadcaster.cxx (?)

	+ One of the 'special' things about the cppuhelper container


    /*/.Name,.Property,.Value


  + 'GetGreatBlob' API call
    + how to manage the UNO type data for that ?
    + how to create a truly 'generic' type ?
	+ ultimately a sequence of any's (right) ?
	+ do we need a new type ?
	+ can we mangle some existing call ?


** Plague of listeners **:	

#0  configmgr::configapi::NotifierImpl::add (this=0xb5740e58, aNode=@0xbf853c24, xListener=@0xbf853d04) at notifierimpl.hxx:122
#1  configmgr::configapi::Notifier::add (this=0xbf853c6c, aNode=@0xbf853c78, xListener=@0xbf853d04) at configmgr/source/api2/confignotifier.cxx:126
#2  configmgr::configapi::genericAddListener<com::sun::star::lang::XEventListener> (rNode=@0xb573e1f4, xListener=@0xbf853d04) at configmgr/source/api2/apinotifierimpl.cxx:84
#3  configmgr::configapi::implAddListener (rNode=@0xb573e1f4, xListener=@0xbf853d04) at configmgr/source/api2/apinotifierimpl.cxx:178
#4  configmgr::BasicRootElement::addEventListener (this=0xb573e1a0, xListener=@0xbf853d04) at configmgr/source/api2/elementaccess.cxx:283


adds the ApiTreeImpl as a listener:

#5  configmgr::configapi::ApiTreeImpl::ComponentAdapter::setComponent (this=0xb5672f10, rxSlot=@0xb5672f28, xComp=@0xbf853d6c) at configmgr/source/api2/apitreeimplobj.cxx:150
#6  configmgr::configapi::ApiTreeImpl::ComponentAdapter::setParent (this=0xb5672f10, xParent=@0xbf853d6c) at configmgr/source/api2/apitreeimplobj.cxx:168
#7  configmgr::configapi::ApiTreeImpl::setParentTree (this=0xb56772bc, pParentTree=0xb573e1f8) at configmgr/source/api2/apitreeimplobj.cxx:730
#8  configmgr::configapi::ApiTreeImpl::init (this=0xb56772bc, pParentTree=0xb573e1f8) at configmgr/source/api2/apitreeimplobj.cxx:671
#9  ApiTreeImpl (this=0xb56772bc, pInstance=0xb5677264, rProvider=@0xb58da3ac, aTree=@0xbf853ee4, pParentTree=0xb573e1f8) at configmgr/source/api2/apitreeimplobj.cxx:417
#10 OSetElement (this=0xb56772b4, pUnoThis=0xb5677264, aTree=@0xbf853ee4, rProvider=@0xb58da3ac, pParentTree=0xb573e1f8) at apiaccessobj.hxx:106
#11 OSetElementGroupInfo (this=0xb5677250, aTree=@0xbf853ee4, rProvider=@0xb58da3ac, pParentTree=0xb573e1f8) at groupobjects.hxx:153
#12 configmgr::configapi::ReadOnlyObjectFactory::doCreateSetElement (this=0xb58da384, aElementTree=@0xbf853f48, pSetElementTemplate=0x0) at configmgr/source/api2/apifactoryimpl.cxx:151
#13 configmgr::configapi::Factory::makeElement (this=0xb58da384, aTree=@0xbf854068, aNode=@0xbf853fdc) at configmgr/source/api2/apifactory.cxx:193
#14 configmgr::configapi::Factory::makeUnoElement (this=0xb58da384, aTree=@0xbf854068, aNode=@0xbf853fdc) at configmgr/source/api2/apifactory.cxx:164
#15 configmgr::configapi::makeElement (rFactory=@0xb58da384, aTree=@0xbf854068, aNode=@0xbf854050) at configmgr/source/api2/apinodeaccess.cxx:134
#16 configmgr::configapi::implGetByName (rNode=@0xb573e1f4, sName=@0xb56dc010) at configmgr/source/api2/accessimpl.cxx:697
#17 configmgr::BasicSetAccess::getByName (this=0xb573e1c8, sName=@0xb56dc010) at configmgr/source/api2/setaccess.cxx:127


Instrumented access pattern wrt. m_aListeners:

File /opt/OpenOffice/OOO_2_0_2/configmgr/source/api2/apitreeimplobj.cxx:480 void configmgr::configapi::ApiTreeImpl::checkAlive() const
File /opt/OpenOffice/OOO_2_0_2/configmgr/source/api2/confignotifier.cxx:111 configmgr::configapi::NotifierImpl::NotifierImpl(const configmgr::configuration::TreeRef&)
File /opt/OpenOffice/OOO_2_0_2/configmgr/source/api2/apitreeimplobj.cxx:465 void configmgr::configapi::ApiTreeImpl::setNodeInstance(const configmgr::configuration::NodeRef&, configmgr::configapi::UnoInterface*)
File /opt/OpenOffice/OOO_2_0_2/configmgr/source/api2/notifierimpl.hxx:122 void configmgr::configapi::NotifierImpl::add(const configmgr::configuration::NodeID&, const com::sun::star::uno::Reference<com::sun::star::lang::XEventListener>&)
File /opt/OpenOffice/OOO_2_0_2/configmgr/source/api2/apitreeimplobj.cxx:480 void configmgr::configapi::ApiTreeImpl::checkAlive() const
File /opt/OpenOffice/OOO_2_0_2/configmgr/source/api2/apitreeimplobj.cxx:480 void configmgr::configapi::ApiTreeImpl::checkAlive() const
File /opt/OpenOffice/OOO_2_0_2/configmgr/source/api2/apitreeimplobj.cxx:480 void configmgr::configapi::ApiTreeImpl::checkAlive() const
File /opt/OpenOffice/OOO_2_0_2/configmgr/source/api2/apitreeimplobj.cxx:473 bool configmgr::configapi::ApiTreeImpl::isAlive() const
File /opt/OpenOffice/OOO_2_0_2/configmgr/source/api2/notifierimpl.hxx:213 void configmgr::configapi::NotifierImpl::remove(const configmgr::configuration::NodeID&, const com::sun::star::uno::Reference<com::sun::star::lang::XEventListener>&)
File /opt/OpenOffice/OOO_2_0_2/configmgr/source/api2/apitreeimplobj.cxx:584 bool configmgr::configapi::ApiTreeImpl::implDisposeTree(const configmgr::memory::Accessor&)
File /opt/OpenOffice/OOO_2_0_2/configmgr/source/api2/apitreeimplobj.cxx:473 bool configmgr::configapi::ApiTreeImpl::isAlive() const
Error: File /opt/OpenOffice/OOO_2_0_2/configmgr/source/api2/apitreeimplobj.cxx, Line 533
Backtrace: [0] ./configmgr2.uno.so: ???+0x1a065c
Backtrace: [1] ./configmgr2.uno.so: ???+0x19ca99
Backtrace: [2] ./configmgr2.uno.so: ???+0x1a91ef
Backtrace: [3] ./configmgr2.uno.so: ???+0x1a7352
Backtrace: [4] ./configmgr2.uno.so: ???+0x1ac473
Backtrace: [5] /opt/OOInstall/program/cfgdemo: ???+0x3ba9
Backtrace: [6] /opt/OOInstall/program/cfgdemo: ???+0x31bd
Backtrace: [7] /opt/OOInstall/program/cfgdemo: ???+0x35b8
Backtrace: [8] /opt/OOInstall/program/cfgdemo: main+0x1d8
Backtrace: [9] /lib/libc.so.6: __libc_start_main+0xdc
Backtrace: [10] /opt/OOInstall/program/cfgdemo: __gxx_personality_v0+0x59
File /opt/OpenOffice/OOO_2_0_2/configmgr/source/api2/apitreeimplobj.cxx:480 void configmgr::configapi::ApiTreeImpl::checkAlive() const
File /opt/OpenOffice/OOO_2_0_2/configmgr/source/api2/confignotifier.cxx:111 configmgr::configapi::NotifierImpl::NotifierImpl(const configmgr::configuration::TreeRef&)
File /opt/OpenOffice/OOO_2_0_2/configmgr/source/api2/apitreeimplobj.cxx:465 void configmgr::configapi::ApiTreeImpl::setNodeInstance(const configmgr::configuration::NodeRef&, configmgr::configapi::UnoInterface*)
File /opt/OpenOffice/OOO_2_0_2/configmgr/source/api2/notifierimpl.hxx:122 void configmgr::configapi::NotifierImpl::add(const configmgr::configuration::NodeID&, const com::sun::star::uno::Reference<com::sun::star::lang::XEventListener>&)
File /opt/OpenOffice/OOO_2_0_2/configmgr/source/api2/apitreeimplobj.cxx:480 void configmgr::configapi::ApiTreeImpl::checkAlive() const
File /opt/OpenOffice/OOO_2_0_2/configmgr/source/api2/apitreeimplobj.cxx:480 void configmgr::configapi::ApiTreeImpl::checkAlive() const
File /opt/OpenOffice/OOO_2_0_2/configmgr/source/api2/apitreeimplobj.cxx:480 void configmgr::configapi::ApiTreeImpl::checkAlive() const
File /opt/OpenOffice/OOO_2_0_2/configmgr/source/api2/apitreeimplobj.cxx:473 bool configmgr::configapi::ApiTreeImpl::isAlive() const
File /opt/OpenOffice/OOO_2_0_2/configmgr/source/api2/notifierimpl.hxx:213 void configmgr::configapi::NotifierImpl::remove(const configmgr::configuration::NodeID&, const com::sun::star::uno::Reference<com::sun::star::lang::XEventListener>&)
File /opt/OpenOffice/OOO_2_0_2/configmgr/source/api2/apitreeimplobj.cxx:584 bool configmgr::configapi::ApiTreeImpl::implDisposeTree(const configmgr::memory::Accessor&)
File /opt/OpenOffice/OOO_2_0_2/configmgr/source/api2/apitreeimplobj.cxx:473 bool configmgr::configapi::ApiTreeImpl::isAlive() const
Error: File /opt/OpenOffice/OOO_2_0_2/configmgr/source/api2/apitreeimplobj.cxx, Line 533
