small speed-up of Zend\EventManager\EventManager::triggerListeners() #2924

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants
Member

marc-mabe commented Nov 9, 2012

This small changes speeds up the calls of triggerListeners 20% (~0.20s before and ~0.16s after)

  • call insertListeners only if the listeners to insert are not empty (already checked above)
  • don't check emptiness to not ran into a loop - the loop itself checks emptiness

my bench: https://gist.github.com/4045274

Maks3w closed this Nov 16, 2012

Maks3w reopened this Nov 16, 2012

@weierophinney weierophinney added a commit that referenced this pull request Nov 19, 2012

@weierophinney weierophinney Merge branch 'hotfix/2924' into develop
Forward port #2924
8eeb1fc

@weierophinney weierophinney added a commit to zendframework/zend-eventmanager that referenced this pull request May 15, 2015

@weierophinney weierophinney Merge branch 'hotfix/2924' 035474f

@weierophinney weierophinney added a commit to zendframework/zend-eventmanager that referenced this pull request May 15, 2015

@weierophinney weierophinney Merge branch 'hotfix/2924' into develop 309bc00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment