[merge][#288751] avoid creating text deltas spanning repository stacks

Martin Pool mbp at canonical.com
Wed Nov 19 07:55:13 GMT 2008


On Tue, Nov 18, 2008 at 10:07 AM, John Arbash Meinel
<john at arbash-meinel.com> wrote:

> I'm not particularly fond of 'has_key()' though I can agree that having
> all callers have to repeat the "key in get_parent_map([key])" is not
> particularly pleasant either.

Can you expand on what you do or don't like here?

>
> However, is there a reason you have to be checking the keys one-by-one
> rather than all in one go?

Well, I don't think I've put that in any more than it was before, with
(in bzr.dev)

                if 'fulltext' not in options:
                    basis_parent = parents[0]
                    # Note that pack backed knits don't need to buffer here
                    # because they buffer all writes to the transaction level,
                    # but we don't expose that difference at the index level. If
                    # the query here has sufficient cost to show up in
                    # profiling we should do that.
                    if basis_parent not in self.get_parent_map([basis_parent]):

> Specifically, when the fetch is almost done, why not check external
> references then, and then you can do a get_parent_map() across all of
> them at once, rather than one at a time? It also handles when you get
> entries in "reverse" order. As Aaron points out, I think if you had the
> revision graph:

We could do that, and then if it turns out the compression parent is
in one of the stacked-on repositories we could copy it across into the
top repository.  In fact, we'd have to continue walking down the delta
closure chain, for each of the things being brought in this way.  This
is possible but it seemed more complex, so I left it for now.  It will
avoid introducing new fulltexts, but it may take more time and it
wasn't obviously better in every regard.

-- 
Martin <http://launchpad.net/~mbp/>



More information about the bazaar mailing list