[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Speeding up blame

From: Peter N. Lundblad <lundblad_at_linux.nu>
Date: 2004-04-24 23:06:05 CEST


I am thinking about speeding up the blame command. I would like to hear
others' opinions on my ideas.

I experimented a little and found that downloading the whole file contents
for each revision where the file was changed takes some time, which is to
be expected. So I think modifying the algorithm so that it downloads text
deltas instead would speed things up a lot. I looked around in
libsvn_client and I have drawn the following conclusions:
- we can't use svn_client_diff for this, since it would be to easy:-)
Seriously, it downloads the file in the first revision for each
invocation, so we wouldn't win anything.
- do_update() in the RA library gives us the information we need. It gives
a diff between two revisions.
- we need to create a custom delta editor for this functionality. Since we
are just interested in a single file, most of the "methods" will be
but apply_text_delta will need to handle the delta and create the new
temporary file for the new revision. Maybe we also need to whach out for
changes in the svn:mime-type property to prevent blame on binary files?
- then we use the above in the loop of the blame command that currently
download each fulltext.

Please note that I am relatively new to the svn codebase, so my
terminology above may look a bit strange. However, I'd like to know if I
am on the right track and if this is a good way to improve the speed of
the blame command. I think this task shouldn't be too hard for a beginner
like me:-)


To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Apr 24 22:57:53 2004

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.