symfony/symfony — pull request #11857 by skigun (2014-09-05 09:43:06+00:00)
Title: [Filesystem] Check number of bytes copied.

Fix #10838

This only test local files (because of `filesize`), wonder if we should include the remote files using `get_headers` in order to get the Content-length for example. However, it will perform an additional request...

Here's a little benchmark for 500 copy from a remote origin file :
- Standard without check -> Time: 47.34 seconds, Memory: 3.75Mb
- Check with `get_headers` ->Time: 1.32 minutes, Memory: 3.75Mb