KnpLabs/Gaufrette — pull request #237 by eluceo (2013-12-03 15:30:47+00:00)
Title: SizeCalculation from FileSystem

Getting the size of a file will use a lot of memory of the moment. The reason therefore is, that the file will be read completly read into memory before the size will be calculated by using `mb_strlen($content)`.

Calculating the filesize of a 800 MB file will use at least 800 MB of memory!

Using the FilesSystem for calculating the size instead of reading the content. This can save a lot of memory using the Local adapter that implements the new SizeCalculator interface.