Adam Bradley, this e-mail is probably most targeted for you.

A week ago Jorrit pointed out to me a slight performance problem with
the event subscription algorithm.  This is seen with the "bouncy" demo
in CEL as a glitch when adding lots of balls to the system (each ball
has it's own event listener) in revision 2141 (CEL moved to a mega
listener for all the balls after that).  I have been reviewing the
event system code and found the cause of the performance problem, but
before I dig in to fix it I have some questions.

1) It doesn't appear that you are using the topological sort algorithm
(topo sort is O(|E|+|V|) and csPO::Solve() is at least O(|V|^2)).  Is
there a particular reason you didn't use this?

2) What exactly is the policy for event handlers that get subscribed
during event handling?  I think that it is that the handler will get
sent the current event if none of its post constraints have already
handled the event, but I want to double check that with you.

3) Do you have a test suite for event handling?  I can convert the
system to use a topo sort algorithm, but a test suite would greatly
help that.

Michael D. Adams
[EMAIL PROTECTED]

P.S. The cause of the performance problem was principally the cost of
doing a csPartialOrder::SanityCheck under debug mode, but even with
the body of SanityCheck commented out there is still a small
performance glitch with large numbers of balls in "bouncy".  It
appears to be mostly due to the SubscriberIterator operating in
SI_GRAPH mode and its call to GetEnabled().

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Crystal-main mailing list
Crystal-main@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/crystal-main
Unsubscribe: mailto:[EMAIL PROTECTED]

Reply via email to