Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

[WIP] loadModule event and ServiceListener support for Modules #1949

Closed
wants to merge 1 commit into from
Closed

[WIP] loadModule event and ServiceListener support for Modules #1949

wants to merge 1 commit into from

Conversation

coss
Copy link
Contributor

@coss coss commented Jul 22, 2012

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/Listeners, and not by the Module Manager.

Benchmark (best of 10 requests):

Imho, this should only be merged, if we can squeeze some performance out of ZF2.

…e and add own service manager to the ServiceListener

- Added new event preloadModule(ModuleEvent)
@ghost ghost assigned EvanDotPro Jul 22, 2012
@travisbot
Copy link

This pull request fails (merged 1b9300c into 588a0f0).

@coss
Copy link
Contributor Author

coss commented Jul 22, 2012

I will write/fix tests later...

@weierophinney
Copy link
Member

I would argue that this should be an extension of the ModuleManager, and could be substituted via a custom factory provided in the configuration.

@coss
Copy link
Contributor Author

coss commented Jul 23, 2012

@weierophinney I kinda agree with you, because, like I said, I don't think that the rare use case justifies that much of an overhead and because RC1 is almost there, there is not much time to look how the performance can be increased, before the API freeze.

onLoadModule callbacks should be avoided anyway, because they are to expensive. Tho' the ServiceListener feature would be nice for ZendDeveloperTools :)

@coss coss closed this Jul 24, 2012
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants