Re: [Modeling-users] Notification Framework v0.5 released
Status: Abandoned
Brought to you by:
sbigaret
From: Sebastien B. <sbi...@us...> - 2003-05-26 13:25:39
|
Hi Kodi and all, Kodi wrote: > I've tested the new feature and it is possible now to add an observer > with different methods for different Notifications. > But it should be pointed out that one has to define a value for the > key 'NOTIFICATION_CENTER_MULTIPLE_CALLBACKS_PER_OBSERVER' in the > environment, in order to enable the new behaviour. Well, yes, that was a terse announcement. However the documentation was updated --I've just updated it a bit more so that it's clear where the reference documentation stands, e.g. in module NotificationCenter cf. http://modeling.sourceforge.net/API/Notification-API/index.html I also forgot to mention that there is a new script tests/compare_perfs.py for comparing the performance of the framework when the new feature is en-/dis-abled. It is ~2.4x slower on my machine when enabled (the modeling framework does not need it to be activated, but of course behaves well when it is). I wrote: > > This release fixes two important bugs implying: > > - addObserver() not reporting when an object tries to register two or > > more different callbacks, > > - postNotification() copying the observers back to its own list, > > making it grow and causing degradation of performance each time it > > is called. > > The modeling framework itself is not affected by these changes and > > did not even triggered the bugs. However and since it may take > > advantages of these changes in the future, you'll probably want to > > upgrade your local copy. Sorry but I was a bit distracted when writing this: on the contrary the MDL is likely to trigger the second bug. It is revealed when a given notification is listened by both generic and specific observers, which is at least the case for MDL's GlobalIDChangedNotification (listened by EditingContext [generic] and DatabaseContext [specific]). Hence it is now *strongly recommended* that you upgrade your local copy with v0.5. Sorry for the wrong comment. Cheers, -- S=E9bastien. |