On Fri, Sep 18, 2009 at 9:10 AM, Evan Martin <[email protected]> wrote:
>
> On Fri, Sep 18, 2009 at 8:48 AM, Nico Weber <[email protected]> wrote:
>> 3.) When I switch branches, XCode likes to rebuild a lot of stuff
>> (considerably more than necessary), which takes forever (30-90 min) on
>> my machines, which makes switching branches very heavyweight for me –
>> enough so that I considered having multiple independent checkouts.
>> Does anybody else see this / have a good answer to this? (This seems
>> to happen more often recently (?))
>
> When git switches branches, it always pushes the mtimes forward of all
> the files involved in the switch.  This is intentional behavior, for
> the following reason.
> Say file A in branch b1 is from last week, then in branch b2 it was
> edited today.  When you switch from b2 to b1, you still want your
> build system to think that A is modified, since you want to rebuild
> the "older" file.
>
> The consequence of this is that every file touched by a branch gets
> rebuilt when you switch branches.  The official answer is that you
> should use ccache, which I find pretty unsatisfying.
>
> Clearly the answer is to write a gitfs that does a
> git-new-workdir-like directory per branch but with proper COW
> semantics.  ;)

Fixing the switch to that branch and rebase it immediately as
mentioned would fix it too, as there would be fewer files touched.

If we had a "create a new branch from trunk and cherry pick all the
changes from old branch onto new branch and rename new to old"
command, that would get rid of the massive rebuilds too.  Maybe
eventually I'll write such a thing (if Evan doesn't beat me to it).

-eric

> >
>

--~--~---------~--~----~------------~-------~--~----~
Chromium Developers mailing list: [email protected] 
View archives, change email options, or unsubscribe: 
    http://groups.google.com/group/chromium-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to