zendframework/zf2 — pull request #1949 by coss (2012-07-22 00:40:25+00:00)
Title: [WIP] loadModule event and ServiceListener support for Modules

Adds the ability for modules to listen to the `loadModule(ModuleEvent)` and to add an own Service Manager to the `ServiceListener`.

While this is nice to have, it adds some overhead which might not be necessary considering the rare use case. The overhead is mainly caused by the Event Manager, and not by the Module Manager.

Benchmark (best of 10 requests):
- 1 Module (ZendSkeletonApplication):
- Current: http://i.imgur.com/G2P93.jpg
- Patch: http://i.imgur.com/3G68I.jpg

- 1 Module (ZendSkeletonApplication) + [20 Dummy Modules](https://gist.github.com/3156434#file_dummy+module):
- Current: http://i.imgur.com/omWTk.png
- Patch: http://i.imgur.com/zPL4u.png

**Imho, this should only be merged, if we can squeeze some performance out of the Event Manger.**