[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Monotone-devel] speed of "mtn ls branches"
From: |
Zack Weinberg |
Subject: |
Re: [Monotone-devel] speed of "mtn ls branches" |
Date: |
Thu, 17 Jan 2008 12:15:56 -0500 |
On Jan 17, 2008 1:06 AM, William Uther
<address@hidden> wrote:
>
>
> On 17/01/2008, at 4:00 PM, Zack Weinberg wrote:
> > While working on something else today I noticed that the suspend-certs
> > implementation appears to be doing redundant work. I'm not
> > remembering exact details, but it looked like: scan through all branch
> > heads and make a list of non-suspended ones, then check
> > --ignore-suspend-certs, then if it's not set, do that again.
...
I found the code I was referring to - it has nothing to do with "ls
branches", but I stand by my original statement.
update.cc, function calculate_update_set:
...
bool have_non_suspended_rev = false;
for (set<revision_id>::const_iterator it = candidates.begin(); it !=
candidates.end(); it++)
{
if (!app.get_project().revision_is_suspended_in_branch(*it, branch))
{
have_non_suspended_rev = true;
break;
}
}
if (!app.opts.ignore_suspend_certs && have_non_suspended_rev)
{
// remove all suspended revisions
base64<cert_value> branch_encoded;
encode_base64(cert_value(branch()), branch_encoded);
suspended_in_branch s(app, branch_encoded);
for(std::set<revision_id>::iterator it = candidates.begin(); it
!= candidates.end(); it++)
if (s(*it))
candidates.erase(*it);
}
...
Seriously, tell me that's not doing the same thing twice.
zw
Re: [Monotone-devel] speed of "mtn ls branches", Tony Tung, 2008/01/17
- Re: [Monotone-devel] speed of "mtn ls branches", William Uther, 2008/01/17
- Re: [Monotone-devel] speed of "mtn ls branches", Richard Levitte, 2008/01/17
- Re: [Monotone-devel] speed of "mtn ls branches", William Uther, 2008/01/17
- Re: [Monotone-devel] speed of "mtn ls branches", Daniel Carosone, 2008/01/17
- Re: [Monotone-devel] speed of "mtn ls branches", William Uther, 2008/01/17
- [Monotone-devel] Re: speed of "mtn ls branches", Lapo Luchini, 2008/01/18