Synchronization preview speed

Advertisement

daffyd
Joined:
Posts:
6

Synchronization preview speed

Hi folks,

I've been playing around with the synchronization feature of WinSCP. The -preview options especially is very helpfull for me as i'd like to do a -preview to look for updates, then prompt the user if they wish to update files (in a simplified "Auto Updater") with a list of changed files.

However i notice a great difference in speed between issuing a synch preview from GUI, and when performed via scripting, and i'd love some input on how to recreate the results i see when using the GUI.

Starting the GUI with the following command:
C:\Users\MyUser>"C:\Program Files (x86)\WinSCP\WinSCP.exe" ftp://Update:@localhost/ /synchronize "C:\LocalFolder" "/FtpFolder" -preview
Then selecting "Local" and ticking off for both comparison criteria completes the operation in less than 7 seconds.

But the below script command completes runs the same operation at more than 2 minutes.
C:\Users\MyUser>"C:\Program Files (x86)\WinSCP\WinSCP.com" ftp://Update:@localhost/ /command "synchronize local C:\LocalFolder/FtpFolder-preview -transfer=binary -criteria=both"

No settings are changed with scripting or through the GUI, and should be default. Could anyone enlighten me how the GUI option can run so much faster?

Reply with quote

Advertisement

martin
Site Admin
martin avatar

According to the log, it takes about almost one minute in the GUI, not 7 seconds. It's still faster, indeed, but not 7 seconds vs. 2 minutes, but rather 1 minute vs. 3 minutes.
Also, you are comparing the files by both size and time in GUI, while by time only in the script, what can have some impact. Can you post logs with the same settings?

Reply with quote

daffyd
Joined:
Posts:
6

martin wrote:

According to the log, it takes about almost one minute in the GUI, not 7 seconds. It's still faster, indeed, but not 7 seconds vs. 2 minutes, but rather 1 minute vs. 3 minutes.
Also, you are comparing the files by both size and time in GUI, while by time only in the script, what can have some impact. Can you post logs with the same settings?

Hi, sorry. This is correct. I have used anonymous data as the original compare source is belongs to a client. File structure and depth is identical, but file and folder names are randomized and filesizes are all 0 kB. I did also notice that the compare took longer for both options with the dummy data, which seems strange... but the difference between the two options were still considerable and that is the main thing i want to figure out.

I have attached new logs, where it should be by both size and date for both options.

Reply with quote

Advertisement

martin
Site Admin
martin avatar

There's one second delay per each directory listing in the script, which I do not have an explanation for.
If you want to investigate further, I have sent you an email with a debug version of WinSCP to the address you have used to register on this forum.

Reply with quote

daffyd
Joined:
Posts:
6

martin wrote:

There's one second delay per each directory listing in the script, which I do not have an explanation for.
If you want to investigate further, I have sent you an email with a debug version of WinSCP to the address you have used to register on this forum.

Ah, ok Martin. Thank you for your time and quick responses!
I have resorted to another way of comparing remote and local files for now, thou not as fancy as this ftp solution would've been ;)

Reply with quote

Advertisement

You can post new topics in this forum