The protected method `getSharedListeners` will only used here - so the method could be removed completely.
(I know it's not the nice way - but could help us with performance)

```php
if (null === $this->sharedManager) {
    $listeners = array_merge_recursive(
        $this->getListeners($eventName),
        $this->getListeners('*')
    );
} else {
    // merge own listeners together with shared listeners
    $identifiers = $this->identifiers;
    if (!in_array('*', $identifiers, true)) { // Add wildcard id to the search, if not already added
        $identifiers[] = '*';
    }

    $listeners = array_merge_recursive(
        $this->getListeners($eventName),
        $this->getListeners('*'),
        $this->sharedManager->getListeners($identifiers, $eventName),
        $this->sharedManager->getListeners($identifiers, '*'),
    );
}
```

PS: Be careful - not tested