forum/Why is git annex status slow?git-annexhttp://git-annex.branchable.com/forum/Why_is_git_annex_status_slow__63__/git-annexikiwiki2015-04-09T18:05:31Zcomment 1http://git-annex.branchable.com/forum/Why_is_git_annex_status_slow__63__/comment_1_a5139c5a9fc94486cf62fc9a9fa9f8d9/joey2014-11-03T17:17:57Z2014-11-03T17:08:50Z
<p><code>git status</code> looks at the index and work tree. In an indirect mode
repository, <code>git annex status</code> does too, and is not significantly slower.</p>
<p>In direct mode, <code>git annex status</code> has to look up from git the key
that corresponds to each file in the work tree. This is the main
thing that slows it down.</p>
<p>(See the code for details, it's quite clear.)</p>
<p>The best workaround is proably to pass git-annex status a subdirectory
that you're interested in, so it can only look at the contents of that one
directory.</p>
Slow on windows but not on linuxhttp://git-annex.branchable.com/forum/Why_is_git_annex_status_slow__63__/comment_2_2f61c2cdf9d1ffd298fd906207012818/Сергей2015-04-07T18:20:23Z2015-04-07T18:20:23Z
If this is by design and <code>git annex status</code> should take more time in direct mode then what I'm experiencing is strange. On windows every 100M file adds approximately 1 second to <code>status</code> duration (on my laptop), but on linux it does not. On linux <code>git annex status</code> even in direct mode takes milliseconds. What is wrong with my setup?
comment 3http://git-annex.branchable.com/forum/Why_is_git_annex_status_slow__63__/comment_3_8d9e5a1aef2648d7a844623e6237d551/joey2015-04-09T18:05:31Z2015-04-09T17:44:01Z
<p>The sizes of the files should not affect how fast git-annex status runs.</p>
<p>But, direct mode certianly does. git-annex has to do significantly more
work in direct mode to figure out the status of a file. Including querying
git. In indirect mode, it can just stat the symlink and see if its content
is present, which is much faster.</p>
<p>(There's probably also some other inneficiencies in Windows.)</p>