[PATCH 0/4] Speed improvement in fetch/clone

Goffredo Baroncelli kreijack at alice.it
Thu Dec 15 22:29:05 GMT 2005


Hi all,

the aim of the following four patches is to improve the performance to the
fetch/clone code. In order to obtain that, I introduced three new functions in the Branch
class: 

fileid_involved_between_revs(from_revid, to_revid)
fileid_involved(last_revid)
fileid_involved_by_set(changes)

These functions return a set of the file_id(s) which are involved in changes.

These functions work on the basis that every line of the inventory refers to one entry;
the functions fileid_involved*( ) scan every line of the inventory.weave file in order to 
detect which file_id(s) are involved in the changes of a range of revisions.

This information is used by the clone/fetch function in order to download the weave(s)
without 
a) expanding all the inventory entries or..
b) .. lists the file presents under .bzr/weave/... which is impossible in
  some transport ( as http ).
If you want to know the gain see my previous email ( 
http://lists.ubuntu.com/archives/bazaar-ng/2005q4/005587.html )

The patches are four, and are applied in this order:

1) the fileid_involved( ) functions
2) the patch of the fetch code
3) the patch of the clone code
4) a test case of the file_involved function

diffstat:
 branch.py                     |   82 +++++++++++++++++++
 clone.py                      |   64 +++-----------
 fetch.py                      |  181 +++++++++++++++---------------------------
 tests/__init__.py             |    1
 tests/test_fetch.py           |    2
 tests/test_fileid_involved.py |  181 ++++++++++++++++++++++++++++++++++++++++++
 6 files changed, 346 insertions(+), 165 deletions(-)

Any feedback  is welcome

Goffredo


( You can browse the repository at

http://goffredo-baroncelli.homelinux.net/bazaar-dev/bzr-fileid-involved

and you can see the full diff at

http://goffredo-baroncelli.homelinux.net/bazaar-dev/bzr-fileid-involved?cmd=diff;otherrevid=mbp@sourcefrog.net-20051213054804-e1dcb0c21cacd174;rev=;pathrevid=;path=

)
-- 
gpg key@ keyserver.linux.it: Goffredo Baroncelli (ghigo) <kreijack @ inwind.it>
Key fingerprint = CE3C 7E01 6782 30A3 5B87  87C0 BB86 505C 6B2A CFF9




More information about the bazaar mailing list