With the https://github.com/phpbb/phpbb/pull/2674 the feature to allow extensions adding custom autoloaders was added.
As far as it iterates all subfolders in the ext/ folder for every page load, and moreover for every avatar/attachment-image loaded on a single page (as the function is called within includes/file.php too), it has a big perfomance impact.
For me, it takes ~0.15 sec (measured with XDebug).
The result of iterating should be cached.
[14:26] Nicofuma: We could cache this result actually.
[14:26] rxu: would be very nice
[14:26] rxu: thanks
[14:26] Nicofuma: And generate a file in cache/autoload.php