Please keep in mind to CC the msysgit mailing list for Windows-specific stuff. I'm also CC'ing Karsten who has worked on performance improvements for Git for Windows in the past.

Thanks for bringing this up!

Sebastian Schuberth

Hi folks,

I don't follow the mailing list carefully, so forgive me if this has
been discussed before, but:

I've noticed that when working with a very large repository using msys
git, the initial checkout of a cloned repository is excruciatingly
slow (80%+ of total clone time).  The root cause, I think, is that git
does all the file access serially, and that's really slow on Windows.

Has anyone considered threading file access to speed this up?  In
particular, I've got my eye on this loop in unpack-trees.c:

static struct checkout state;
static int check_updates(struct unpack_trees_options *o)
         unsigned cnt = 0, total = 0;
         struct progress *progress = NULL;
         struct index_state *index = &o->result;
         int i;
         int errs = 0;


         for (i = 0; i < index->cache_nr; i++) {
                 struct cache_entry *ce = index->cache[i];

                 if (ce->ce_flags & CE_UPDATE) {
                         display_progress(progress, ++cnt);
                         ce->ce_flags &= ~CE_UPDATE;
                         if (o->update && !o->dry_run) {
                                 errs |= checkout_entry(ce, &state, NULL);
         if (o->update)
                 git_attr_set_direction(GIT_ATTR_CHECKIN, NULL);
         return errs != 0;

Any thoughts on adding threading around the call to checkout_entry?

Thanks in advance,


To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to
More majordomo info at

Reply via email to