Swapping conditions in the function accept() of the class \phpbb\recursive_dot_prefix_filter_iterator saves a lot of isDir() calls which is more expensive than $filename[0] checks.
https://github.com/phpbb/phpbb/blob/3.1.x/phpBB/phpbb/recursive_dot_prefix_filter_iterator.php#L28