Rev graph caching strategy

Martin von Gagern Martin.vGagern at gmx.net
Sat Nov 28 10:26:58 GMT 2009


Ian Clatworthy wrote:
> I think the right strategy wrt caching is to do it in one plugin and for
> other plugins to leverage that. Otherwise we end up with caching all
> over the place (loggerhead, trac-bzr, qbzr, etc.). That's a problem
> because we'll need to re-optimise each plugin as the core improves:
> caching can be great but also counter-productive.

I like the idea! Caring about the internal efficiency of operations
shouldn't be required from each and every client using bzrlib. But on
the other hand, implementing a lot of caching in bzr by default wouldn't
make a lot of sense either unless tehre was someone actually using that
information. So a bzr plugin for this seems a good idea.

> I made a start down this path last year. See
> http://doc.bazaar-vcs.org/plugins/en/historycache-plugin.html and
> https://launchpad.net/bzr-historycache. It would be good if those of us
> interested in caching worked together to improve this so multiple
> plugins benefit.

Haven't looked at the sources yet. Here are a few things that came to my
mind might be worth caching, mostly on a per-branch basis:
1. revids to dotted revnos and vice versa (per branch)
2. revid to index in a topological sorted list and vice versa (per repo)
3. revid to list of merge points integrating it (probably per repo)
4. revid to child revisions, i.e. inverse parent map (per repo)
5. a (linked list) history for subdirs of a branch, taking modifications
   to children into account (per repo, probably very Trac-specific)

> I've just upgraded the trunk to 2a and changed the ownership to be bzr
> instead of me. If you want to commit to it's trunk and aren't in bzr,
> please apply for membership.

Thanks. Will have a look one of these days, but probably not before I
got trac-bzr 0.3.0 out of the door. First things first.

-- Martin

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20091128/00e553ac/attachment.pgp 


More information about the bazaar mailing list