monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] responses to some IRC discussion of 'automate'


From: Thomas Moschny
Subject: Re: [Monotone-devel] responses to some IRC discussion of 'automate'
Date: Mon, 7 Aug 2006 10:21:44 +0200
User-agent: KMail/1.9.3

On Monday 07 August 2006 03:22, Nathaniel Smith wrote:
> > [SQL]
>
> Okay, I've spent a few minutes staring at this, and I give up :-).
> Can you break down what it does in English?

While I am personnally not yet convinced that this SQL statement works 
correctly :), the basic idea I had yesterday while talking to Thomas Keller 
on irc was the following:

Currently the code to determine branch heads basically does the following: It 
first fetches all revisions carrying that branch tag and then calls 
erase_ancestors on this list. This doesn't scale well, e.g. for the main nvm 
branch the list of revisions feed to erase_ancestors becomes very large.

Now, while I am not familiar with the inner workings of erase_ancestors, I 
suppose it's runtime is not linear in the size of it's argument list. So we 
should recuce that list. Obviously, only those revisions qualify as branch 
heads that either don't have children at all, or only have children carrying 
different branch tags. Using this criterion (and having an indexed  
revision_ancestry table) it should be possible to scrub the list easily 
before feeding it to erase_ancestors.

However I am not sure whether this can be done using SQL, because all tags 
(includung the branch tags) have to be validated before any reasoning can be 
done based on their values.

Thomas

-- 
Thomas Moschny  <address@hidden>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]