wolpi / prim-ftpd

FTP server app for android
Other
633 stars 79 forks source link

Getting directory list is extremely slow when there are lots of files #339

Open kord1e opened 7 months ago

kord1e commented 7 months ago

For example, accessing the camera folder of the phone takes very long (several minutes) when there are lots of pictures. This often causes a timeout in the client unless the timeout value is extended.

primitive FTPD version: 7.0 (code: 63) Phone: Oneplus 3T OS: LineageOS for microG 18.1 (Android 11) Protocol: SFTP Storage type option: plain old filesystem Client: Filezilla 3.63.0

wolpi commented 6 months ago

Yes, that is known. What storage type do you use? With SAF that is very slow. It is better with the others. This is caused by Android APIs. There is not much this app can do about it.

The approach Google wants us to use here is:

kord1e commented 3 months ago

Yes, that is known. What storage type do you use? With SAF that is very slow. It is better with the others. This is caused by Android APIs. There is not much this app can do about it.

I'm using "Plain old filesystem". I can try other options, although not Super user since my phone is not rooted and I don't want to root it.

I suppose that there is not much difference between protocols (SFTP vs FTP)?

wolpi commented 2 months ago

I'm using "Plain old filesystem"

Ok, that one is faster than SAF. So you use already the "better" one. As Read-Only SAF has been fixed in latest release you might try with this one. Note that Google has not published it yet on Play, thus you might have do download it from another source (see README).

I suppose that there is not much difference between protocols (SFTP vs FTP)?

Some users report that FTP is much faster for them.

But in this case it is likely to be independent of protocols. As I indicated above: when there are lots of pictures in DCIM folder Android APIs become very slow. In UIs that is handled differntly as they don't load all images at once. But with a file oriented app like this one we cannot do that.

And again the same suggestion as above: don't try to open such a folder directly. Use some Photos app to select the pictures you want to download and use share functionality to pass it to this server app.