michaellukashov / Far-NetBox

SFTP/SCP/FTP/FTPS/WebDAV/S3 client for Far Manager 3 (http://farmanager.com/)
https://forum.farmanager.com/viewtopic.php?t=6317
GNU General Public License v2.0
158 stars 52 forks source link

Directory listing is uber slow #50

Closed cnst closed 11 years ago

cnst commented 11 years ago

I'm using NetBox 2.1.23 with Far 3.0.3000, and I find that the directory listing with a remote server (170ms away) is uber slow.

When I'm logged through PuTTY to the said server, directory listing, with ls -la, takes no time, and the list appears instantaneously (within milliseconds).

When I'm logged through NetBox to the very same server, directory listing takes about 4 seconds (yes, 4000ms), which, without any exaggeration, is roughly 20× slower than what I would expect it to be.

Why is directory listing in NetBox so slow?

michaellukashov commented 11 years ago

First, make sure logging is off (F11 --> Netbox commands --> Configure --> Logging settings --> [ ] Enable logging)

cnst commented 11 years ago

Logging is off, and I've never turned it on. (It's pretty much a fresh install.) Compression is on (both in PuTTY and NetBox), but the server is an idle quad core, and the client is a dual core, so, I would not think that compression is supposed to affect this. I've tried turning compression off, but it's still super slow.

I think the SCP setting was on; when I switched to SFTP, it might seem a little faster, but it's still very slow, never faster than 1 whole second (usually between 1.5s and 2.5s).

When I type ls -la /etc in PuTTY, I get the result instantaneously (definitely under 0.4s, probably around 0.2 or 0.3s), but NetBox SFTP takes 2.2s to produce the listing.

I think NetBox must be doing something with having to wait for the result of prior commands before issuing new ones, and, supposedly, use way more than a single command to generate the listing, and that slows the whole thing down dramatically if there is any sort of latency between the hosts.

Are you implying that you're unable to reproduce this? I've just tested psftp, and it seems to suffer from the same problems, so, I guess this code is not unique to NetBox. :-( OpenSSH sftp with ls -l /etc on OS X seems to be roughly twice as fast as psftp with ls /etc, but it's still very slow... Strange.

michaellukashov commented 11 years ago

Latest Far3 nightly build http://www.farmanager.com/nightly/Far30b3239.x86.20130312.7z has new version of NetBox, you can check if directory listing is improved or not.

michaellukashov commented 11 years ago

No replies - I assume issue is solved.