jmikola/WildcardEventDispatcher

Performance

goetas opened this issue · 2 comments

Hi, this event dispatcher looks interesting to me...

Do you have performance benchmarks for it compared to the standard sf event dispatcher?
I guess is slower, but was curios to see what order of difference is.

I was considering it as a replacement of a custom implementation... and feature-wise looks a good fit, was curious about performances... since an event-system often if the first bottleneck of a system

Do you have performance benchmarks for it compared to the standard sf event dispatcher?

Unfortunately, I have no benchmarks or profiling data to share. I've not used the library in 4+ years and do not have a project with which it could be examined.

That said, the crux of the library is performing one of several regex matches on dispatched events (depending on the limited wildcard operators supported). I would be surprised to find that this introduced significant overhead.

If you'd like to compare the library, I'd suggest creating a single-purpose application using various EventDispatcher implementations and then profiling it with a tool like Tideaways or Blackfire. That should provide an accurate look at time and memory consumption.

Thanks a lot for the answer, will try to benchmark it. Will post results here