views:

59

answers:

1

Hi,

I was wondering what others think about kohana's Event component. I like it very much and use it extensively although I am aware that the feature is not native to PHP.

As I have to make a decision for a framework to use in an upcoming and traffic-intensive project I would like to hear your thoughts on the subject.

Besides all optimization that is not in the language (reverse proxy, memcached, apc ect) I want to avoid to build the application using events only to find out that they become a major bottleneck due to bad performing implementation.

I have run ab on two testcases (one with, one without events) and had no significant performance differences although that might not be very representative for a real-life app.

Do you have experience with kohana events in high performance environments? Did it perform well/bad or have no impact on performance at all.

Thanks for your input!

A: 

Hi

I have been using the kohana-event module built by samsoir for a couple of projects now. Its a great system and allows you to easily decouple code.

From what I understand, I cannot really see how using such a system can hit performance enough for it to be a concern. All it does is register functions to be called when an Event is run. To me that is no different to just running those functions/code manually.

Whenever I code, I tend to worry about performance second (to a certain extent) and code maintability first. I would find that this would be an acceptable trade off for performance.

On a high traffic environment, I have no idea, I have written some fairly popular apps using the event module, but I haven't noticed any performance hit. Normally if you have an application with high traffic, and you have performance issues, these come from database bottle necks as opposed to running of PHP itself.

If I am wrong, I will stand corrected.

Bowen