stefankueng / CryptSync

CryptSync is a small utility that synchronizes two folders while encrypting the contents in one folder. That means one of the two folders has all files unencrypted (the files you work with) and the other folder has all the files encrypted.
https://tools.stefankueng.com/CryptSync.html
GNU General Public License v3.0
400 stars 72 forks source link

What makes sync take so much time? #96

Closed Kaligula0 closed 1 year ago

Kaligula0 commented 1 year ago

What can cause the sync to take so much time? It takes about 16-20 sec for changes to take effect in another folder. I even tested with zero-byte txt files without compression and without encryption, source/target folders are on the same HDD, sync both ways. 13:46:18 source file was created, 13:46:36 app's log noted "INFO: encrypted file is older: (…) INFO: copy file (…)" and that moment the mirrored file appeared.

Is this something with my settings, my PC, algorithm, libraries or the app itself?

stefankueng commented 1 year ago

The delay is intentional. When a change is detected it is added to a queue. Then after a few seconds (as you've noticed) that queue is worked on. The reason is that often it happens that a file is changed multiple times in a short time. We don't want to sync such a file multiple times but only once after all the changes to it are done.

Kaligula0 commented 1 year ago

Thank you for explanation :)