FileProvider
FileProvider copied to clipboard
Memory usage for FTPFileProvider seems very high
I'm looking for an FTP solution for iOS, and FTPFileProvider seems like the way to go, but, in my testing, it appears as if the entire file is loaded into memory, which won't work for my particular case. Is this true? If so, is there a way to reduce the memory footprint and have downloads go to a file directly?
Perhaps this is also the reason that the Progress delegate only gets called once the file download has completed, too, and that the Progress information does not have the total unit count (expected size).
Use copyItem(localFile:, to:)
and copyItem(path:, toLocalURL:)
functions in order to not load contents into memory.
I'm using copyItem(path:toLocalURL) for the downloads.
I am using copyItem(path:, toLocalURL:) and the memory size seems to grow as the file is read from the remote server. The FTPStreamTask seems to append incoming data to the "dataReceived" object, and that is consuming the memory.
This also seems to happen when uploading a file to a FTP server when using copyItem(localFile:, to:)
. Is there any way around NOT loading the whole file intro RAM?
Any update on this? @pansophy @adrianilie9 @amosavian