There are a few delays along the way. When Syncthing notices a file has changed, it’s rehashed and an index transmission to other devices is scheduled in five seconds (so that we can pick up further changes and batch them into the same message if possible). That “notices a file has changed” thing is from a scan, either scheduled or enforced by syncthing-inotify because it has seen a change. I think syncthing-inotify also delays by a few seconds for debouncing.
On the receiving side, getting an index update causes a “pull” to be scheduled in five seconds - again, because we ideally want to batch more updates into that same pull. So all in all, you have at least ten seconds from the change being detected until we actually start pulling blocks on the other side.
The “five seconds” here are picked out of thin air because they seem reasonable to me. It could be that one second would work equally well given how fast things are usually moving. shrug
@Zillode About updating-sync between machines, I can’t see any changes for the moment, with the new syncthing-gtk. I’ve modified a file on pc-a 3 hours ago and it has not been immediatly (or almost) pushed to the pc-b.
I’ve restarted syncthing on pc-b → file still not updated. I can’t access pc-a right now to restart syncthing on this one too.
(few minutes later) I have-restarted syncthing on pc-a and now modified file has been sync’ed with pc-b.
Is this forum best place to ask about syncthing-gtk ? Since I’ve installed it on my 3 “testing” pc I have an issue only on one : integration with nautilus. On the desktop, files and folders have no sync-emblems until I do a “nautilus -q”. (Ubuntu 14.04 Unity). Emblems appear “in” nautilus for others folders, but not for the files “inside” desktop.
I also would be interested in being able to configure the “five second” delay. We are working on an application where minimal delay in file updates is important. Relative to other file sharing technologies, Syncthing shows promise of being particularly responsive - it would be good to take advantage of this and tune this parameter.
Currently, Syncthing will start pulling changes one second after getting an incoming update that lets it know about them. It sends pending changes (such as discovered by scanning, inotify or pulling) each five seconds.
I think the first interval could probably be reduced a bit, as it’s essentially a “reaction time” to something external. A short delay is useful to let more changes come in, but not essential.
The other interval should be changed to something that actually reacts to index changes instead of looking each five seconds. This ties into the power usage discussion etc…