Re: slow git-cherry-pick.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Paweł Sikora <pawel.sikora@xxxxxxxx> writes:
>

Umm, there's a gem here that the thread missed so far:

> my git repo isn't very big[1] but it's checked out on the linear lvm
> where random i/o generally hurts and strace shows that current git version
> performs 2x{lstat}+1x{open,read,close} [2] on whole checkout before
           ^^^^^^^^^

There's no reason why it should do the lstat() *twice* for every file.
But Paweł is right; the code path roughly goes like this:

int cmd_cherry_pick(int argc, const char **argv, const char *prefix)
{
[...]
	res = sequencer_pick_revisions(&opts);

int sequencer_pick_revisions(struct replay_opts *opts)
{
[...]
	read_and_refresh_cache(opts);
[...]
	return pick_commits(todo_list, opts);
}

static int pick_commits(struct commit_list *todo_list, struct replay_opts *opts)
{
[...]
	read_and_refresh_cache(opts);


I'm too tired to dig further, but AFAICT it's just a rather obvious case
of duplication of effort.

-- 
Thomas Rast
tr@xxxxxxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]