Review Request: VCS: Speedup the check for non-existant git-repositories

Fabian Wiesel fabian.wiesel at googlemail.com
Tue Apr 7 06:39:49 UTC 2009



> On 2009-04-06 14:43:21, Andreas Pakulat wrote:
> > How deep was your test tree? I suggest to take a directory hierarchy thats at least 100 levels deep (counted from the .git directory, not '/') as "worst case" scenario.
> 
> Fabian Wiesel wrote:
>     The tree was fairly flat, only 4 directories deep from the root, 4 directories into the repository.
>     
>     
>     Directory depth 100:
>              With    Without patch
>     Non-git: 5-6ms   20-25ms
>     Git:     30ms    14-20ms
>     
>     Directory depth 200:
>               With       without patch
>     non-git:  15-45ms    30-60ms
>     git    :  90ms-132ms 14-20ms
>     
>     
>     On a NFS share, and a directory  depth of roughly 100, the time with the patch applied is 25-50ms instead of 30-80ms.
>

I have to redo the benchmark. The git-without-patch-case is with hot-cache, while the one with patch applied is with cold cache.
Unless git does something magic, it can't be faster than linear, since it also doesn't know the location of the .git directory.


- Fabian


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/532/#review848
-----------------------------------------------------------


On 2009-04-06 11:08:09, Fabian Wiesel wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/532/
> -----------------------------------------------------------
> 
> (Updated 2009-04-06 11:08:09)
> 
> 
> Review request for KDevelop.
> 
> 
> Summary
> -------
> 
> In the case that a directory is not under the control of git, a check whether a directory is under version control accounts roughly 40ms of a total 70ms (Peak ~200ms) in the creation of a context menu.
> By first checking for the existence of a .git directory in all parent directories, one avoids the call to an external program.  Should a correctly named directory be found, the external program is still called, which does a more sophisticated check.
> 
> In my limited "benchmark", the additional calling costs seem to be up to 1ms.
> 
> 
> Diffs
> -----
> 
>   /trunk/KDE/kdevplatform/plugins/git/gitplugin.cpp 950241 
> 
> Diff: http://reviewboard.kde.org/r/532/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Fabian
> 
>





More information about the KDevelop-devel mailing list