Event: Remove unnecessary check from call() hot path

This check is completely unnecessary since handlers get unregistered when a plugin is disabled. Additionally, this is an extremely hot path and this change produces a modest 5% performance improvement to event calls.
This commit is contained in:
Dylan K. Taylor 2018-10-07 16:36:30 +01:00
parent 0e508876d2
commit ab5aec6c30

View File

@ -92,10 +92,6 @@ abstract class Event{
$currentList = $handlerList;
while($currentList !== null){
foreach($currentList->getListenersByPriority($priority) as $registration){
if(!$registration->getPlugin()->isEnabled()){
continue;
}
$registration->callEvent($this);
}