That's only a small part of the picture though, how many listeners are there per each event? And how large do you think the overhead specific to delivery guards is compared to the constraint propagation handlers? On my machine (an old 2011 MBP), the following gives throughput on the order of 300k-600k deliveries per second (very variable, due to the amount of garbage generated from copying subs, I presume) #(1 10 100 1000) collect: [ :listeners | a := Announcer new. b := Object new. "Single message send in handler" listeners timesRepeat: [a when: Announcement do: [ :a | a yourself ] for: b.]. "announcement creation overhead not included" ann := Announcement new. [a announce: ann] bench]. Cheers, Henry And with a registry tuned for delivery, yet maintaining the guards (attached)/exception/error handling properties, 900k -> 2.5M #(1 10 100 1000) collect: [ :listeners | a := Announcer new. b := Object new. a instVarNamed: 'registry' put: DeliveringSubscriptionRegistry new. "Single message send in handler" listeners timesRepeat: [a when: Announcement do: [ :a | a yourself ] for: b.]. "announcement creation overhead not included" ann := Announcement new. [a announce: ann] bench.]. |
DeliveringSubscriptionRegistry.st
Description: Binary data
signature.asc
Description: Message signed with OpenPGP using GPGMail
