FTP performance with PHP and Symfony Finder FTP performance with PHP and Symfony Finder symfony symfony

FTP performance with PHP and Symfony Finder


It seems that PHP's SplFileInfo reconnects to the FTP server every time you call a method like isFile() or isDir() on it. These methods are used by Finder and that is what is causing the bad performance. Multiple FTP sessions are opened for every file in order to get all the file information.

See https://github.com/symfony/symfony/issues/18923


Maybe you can get full list of files, and filter it in your script.