You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Investigate if csync processing local diretories can be optimized #880
I haven't investigated more here, but I still have hope that on Windows FindFile is faster because the Windows POSIX functions might not be implemented that well..
Some more findings regarding Windows:
We use a special call GetFileInformationByHandle (in csync_vio_local_stat) to get an inode (as on Windows, the inode is not retrieved via stat).
However, we don't seem to be using the inode anymore for move dection. (as per f1b4a7a )
But we use it somewhere else..
EDIT: I was mistaken, it is still used for rename detection, just not for update detection.
Activity
guruz commentedon Aug 18, 2013
Looks like on OS X and glibc the
ftsdostatinternally too :( I had hoped they would do something more cool.guruz commentedon Aug 18, 2013
Work in progress patch for
fts, doesn't improve performance: https://gist.github.com/guruz/6260817(benchmarked with 1000 files, local ownCloud and
./client/ocsync --test-updateguruz commentedon Aug 27, 2013
I haven't investigated more here, but I still have hope that on Windows
FindFileis faster because the Windows POSIX functions might not be implemented that well..shoeper commentedon Nov 27, 2013
I think on windows there is another way. You can register your program to watch directories - owncloud gets notified by windows when there is a change then.
http://msdn.microsoft.com/en-us/library/aa365465.aspx
That should be much faster
guruz commentedon Nov 28, 2013
Mirall is already watching directories, no worries :) https://github.com/owncloud/mirall/blob/master/src/mirall/folderwatcher_win.cpp
This is about iterating which is currently needed for each sync.
guruz commentedon Feb 5, 2014
Some more findings regarding Windows:
We use a special call
GetFileInformationByHandle(incsync_vio_local_stat) to get an inode (as on Windows, the inode is not retrieved via stat).However, we don't seem to be using the inode anymore for move dection. (as per f1b4a7a )
But we use it somewhere else..
EDIT: I was mistaken, it is still used for rename detection, just not for update detection.
guruz commentedon Feb 5, 2014
The
csync_vio_local_statcallsGetFileTimealthoughGetFileInformationByHandlealready can retrieve the time values.guruz commentedon Feb 21, 2014
I was able to optimize
csync_vio_local_staton Windows4630244
danimo commentedon Mar 26, 2014
@guruz Since you committed this, do you want to close the issue or keep investigating?
guruz commentedon Mar 26, 2014
I'll move this 1.7 ..
14 remaining items
CSync: Split csync_vio_local.c
guruz commentedon Jul 13, 2015
Update: @dragotin has switched the Windows code to use
FindFirstFileWfor 2.0. I'll try to do some optimizations based on this.dragotin commentedon Sep 28, 2015
This is done.