tjibbevanderlaan / chromeos-filesystem-sftp

ChromeOS app to access SFTP server
https://chrome.google.com/webstore/detail/shared-network-folder-sft/gbheifiifcfekkamhepkeogobihicgmn
BSD 3-Clause "New" or "Revised" License
82 stars 21 forks source link

Change the chunk size to 512KB for a stable a file writing operation. #138

Closed yoichiro closed 5 years ago

yoichiro commented 5 years ago

Abstract

To improve the stability of a file writing operation, change the chunk size.

Expected Behavior

For example, when we try to copy one hundred files which their file size is about 6MB, all files are copied successfully.

Actual Behavior

In the case above, the copying file operations are stopped after copying some files (the number of the files is about 10).

Solution

Currently, a writing operation for a file is divided for each 32KB. The file system provider API usually requests a writing operation for each 512KB. That is, in the current implementation of this app, it is necessary to send 32KB 16 times for one writing request from the FSP API.

It seems that the chunk size is too small. When I tried to copy files like the above with the 512KB as the chunk size, the copy operations were stable. Also, the performance was increased.

yoichiro commented 5 years ago

@tjibbevanderlaan Could you test a copy operation on your environment with this pull request?