svn2bzr released

Gustavo Niemeyer gustavo at niemeyer.net
Tue Oct 18 03:01:28 BST 2005


Hello Jelmer,

> The first step (Revision XX read) is quite fast and completes in just
> a few minutes. The second step (committing to bzr) however is very
> slow. The first 10 commits in the second step were taking about 4
> hours. Is there any reason to expect the next 10090 commits will be
> significantly faster then the first 10?

I finally took some time to investigate why it was so slow. I've
profiled the code, and discovered that most of the time was being
spent on packing and unpacking the inventory XML. That was happening
because svn2bzr was calling branch.add/remove on each file, whenever
these operations were seen, and bzr will add/remove the entry in
the working inventory instantly, and save that on disk.

While there's still room for speed improvement, I've fixed that
problem, and svn2bzr is now a *lot* faster. Operations are being
cached on a kind-of-action basis (all adds which are in sequence
are done as a single operation, and so on).

Notice that in your samba dump, the second revision will add
~1800 files in the branch, and revision 3 will create three
different branches, meaning more ~5400 files. If you're splitting
out branches by using the trunk scheme (or using --prefix/--exclude),
that's no big deal, but if you're using a single branch to get the
whole repository (tags, branches, etc), this is a little heavier.

The following few revisions also do massive add/removes, so there's
indeed a reason why the first few revisions are slower. Anyway, the
first 10 commits take now just a few minutes.

The new version is already at

   http://bazaar.canonical.com/svn2bzr

Please, let me know if you test it.

Best regards,

-- 
Gustavo Niemeyer
http://niemeyer.net




More information about the bazaar mailing list