Calling git_stash_save with libigt2 v0.24.1 on the linux repository takes 8 seconds to stash a single untracked file on my machine. Using the git command takes less than 2 seconds. I am running on the current version of Debian Stretch: "4.6.0-1-amd64 #1 SMP Debian 4.6.4-1 (2016-07-18) x86_64 GNU/Linux"
I've attached a simple cpp sample, and put it in a gist as well.
stashtest.zip
https://gist.github.com/mikesart/a99585317a8f57f0f57b9e5bd17d37c0
It appears the time is going into git_diff_tree_to_workdir and git_diff_index_to_workdir. I will update this bug report with the results on Windows tomorrow.
To reproduce:
mikesart@mikesart-cos:~/dev/linux/linux-src (master)$ git remote -v
origin git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git (fetch)
origin git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git (push)
mikesart@mikesart-cos:~/dev/linux/linux-src (master)$ git rev-parse HEAD
4935e04ef431c7980ba6e8145ad4c697abccf6b9
mikesart@mikesart-cos:~/dev/linux/linux-src (master)$ echo "blah" > blah.txt
mikesart@mikesart-cos:~/dev/linux/linux-src (master)$ git status --short
?? blah.txt
mikesart@mikesart-cos:~/dev/linux/linux-src (master)$ time git stash -u
Saved working directory and index state WIP on master: 4935e04 Merge branch 'for-linus-4.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml
HEAD is now at 4935e04 Merge branch 'for-linus-4.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml
real 0m1.864s
user 0m1.336s
sys 0m0.796s
mikesart@mikesart-cos:~/dev/linux/linux-src (master)$ stashtest .
Opening repository '.'
Calling git_repository_open_ext...
0.47ms
Calling git_signature_default...
0.09ms
Calling git_stash_save...
7935.53ms
Calling git_stash_save with libigt2 v0.24.1 on the linux repository takes 8 seconds to stash a single untracked file on my machine. Using the git command takes less than 2 seconds. I am running on the current version of Debian Stretch: "4.6.0-1-amd64 #1 SMP Debian 4.6.4-1 (2016-07-18) x86_64 GNU/Linux"
I've attached a simple cpp sample, and put it in a gist as well.
stashtest.zip
https://gist.github.com/mikesart/a99585317a8f57f0f57b9e5bd17d37c0
It appears the time is going into git_diff_tree_to_workdir and git_diff_index_to_workdir. I will update this bug report with the results on Windows tomorrow.
To reproduce:
mikesart@mikesart-cos:~/dev/linux/linux-src (master)$ git remote -v
origin git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git (fetch)
origin git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git (push)
mikesart@mikesart-cos:~/dev/linux/linux-src (master)$ git rev-parse HEAD
4935e04ef431c7980ba6e8145ad4c697abccf6b9
mikesart@mikesart-cos:~/dev/linux/linux-src (master)$ echo "blah" > blah.txt
mikesart@mikesart-cos:~/dev/linux/linux-src (master)$ git status --short
?? blah.txt
mikesart@mikesart-cos:~/dev/linux/linux-src (master)$ time git stash -u
Saved working directory and index state WIP on master: 4935e04 Merge branch 'for-linus-4.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml
HEAD is now at 4935e04 Merge branch 'for-linus-4.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml
real 0m1.864s
user 0m1.336s
sys 0m0.796s
mikesart@mikesart-cos:~/dev/linux/linux-src (master)$ stashtest .
Opening repository '.'
Calling git_repository_open_ext...
0.47ms
Calling git_signature_default...
0.09ms
Calling git_stash_save...
7935.53ms