[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Monotone-devel] Suspend certs...
From: |
William Uther |
Subject: |
Re: [Monotone-devel] Suspend certs... |
Date: |
Sat, 11 Aug 2007 18:16:34 +1000 |
On 11/08/2007, at 4:24 PM, Thomas Keller wrote:
William Uther schrieb:
As I threatened a while ago :), I've just merged the suspend-certs
branch into trunk. I've also used the my first real suspend
cert, in
the suspend-certs branch to close off a micro-branch that I
didn't like.
Just a quick note. This may affect the speed of some operations. It
would be good if people reported any change after the merge that
affects
them.
In particular, mtn ls branches is a fair bit slower now. It would be
much better if it were incremental, then it wouldn't seem quite so
bad.
Ouch, 35.92 user against 0.06 user before.
Yeah.
The problem is that we are now running "mtn heads" on every branch to
see if it has heads. "mtn heads" is an inefficient operation. (See
project_t::get_branch_heads() in project.cc, and
erase_ancestors_and_failures() in revision.cc if you're following
along at home.)
To get the heads of a branch, we first get every revision that has a
cert with that branch name. Then we go through and erase ancestors
and failures on that list. This means that a full list of all
branches requires getting every revision in the db at least once, and
running erase ancestors on them all, one branch at a time. This was
discussed recently:
http://thread.gmane.org/gmane.comp.version-control.monotone.devel/11737
The impression I got from that discussion was that adding heights to
the erase_ancestors() code wouldn't make much difference. (I think I
get heights now, in general.)
Some caching would be better I suspect, but you'd need to be able to
regenerate the cache when any of the trust hooks changed.
And somehow ls branches
doesn't honor --ignore_suspend_certs
Um, what do you mean. There is a test in the test-suite that
suggests it does. Can you provide an example?
If you mean that it doesn't speed things up again, then I agree. I
can patch it to look for that flag and skip some processing in that
case.
(why are there underscores instead of dashes, btw?)
er, fixed.
Can you elaborate a bit more what you mean with "incremental"?
At the moment the 'ls branches' command gathers the list of branches,
then prints them all out. This puts a large pause at the beginning.
It would be better if it printed out the results as it gathered
them. See rev 2cd2f09be1e162f6e703cc576c11845939c552e6 for an
example. That revision also sends everything through lua, which I
wasn't convinced was a good idea, so I didn't merge that with trunk.
IMHO if
we do not get the speed of ls branches down to only a few seconds, we
should make --ignore_suspend_certs the default for ls branches and
other
affected commands.
Well, I think there may be some other options. e.g. ignore trust
hooks for 'ls branches'. That should allow a version to be written
that was pretty quick.
Be well,
Will :-}
- [Monotone-devel] Suspend certs..., William Uther, 2007/08/10
- Re: [Monotone-devel] Suspend certs..., William Uther, 2007/08/10
- Re: [Monotone-devel] Suspend certs..., Thomas Keller, 2007/08/11
- Re: [Monotone-devel] Suspend certs...,
William Uther <=
- Re: [Monotone-devel] Suspend certs..., Thomas Keller, 2007/08/11
- Re: [Monotone-devel] Suspend certs..., Thomas Moschny, 2007/08/11
- Re: [Monotone-devel] Suspend certs..., William Uther, 2007/08/11
- Re: [Monotone-devel] Suspend certs..., William Uther, 2007/08/12
- Re: [Monotone-devel] Suspend certs..., Nathaniel Smith, 2007/08/12
- Re: [Monotone-devel] Suspend certs..., William Uther, 2007/08/12