info-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Idea for reducing disk IO on tagging operations


From: Dr. David Alan Gilbert
Subject: Re: Idea for reducing disk IO on tagging operations
Date: Mon, 28 Mar 2005 19:06:36 +0100
User-agent: Mutt/1.5.6+20040907i

Hi,
  Well, I've had a crack at implementing the optimisation; and attached
is a patch which seems to work - but there is at least one nasty
hack in it; more about that in a sec.

To enable it you need to add:
  TagOverwriteEnable=yes
to the config file in the CVSROOT; without that it should not
change behaviour in any way (except adding that as a commented
out option with warning to a newly created repository).

It won't give you any performance benefit on the first tag, but should
give something on subsequent tags.  I see some improvement (~15%)
but it is variable, on a large repository that doesn't fit in
memory on my home machine.

It is my first dig into the CVS code base, so I would appreciate
(gentle) comments.

Now some details;
  1) The real nasty hack; this is something that I hadn't thought
  of (and I don't think anyone else noticed?) in my original
  description; the permissions on the rcs files is read only
  so when I need to open them to overwrite I can't - this is a pain;
  this patch has a gratuitous (and obviously WRONG) hack in of
  chmod'ing it before the open - I'm open for any suggestions *if*
  there is a right way of doing this. (This was a pain because
  it was at the very last stage of the patch that I noticed this!).

  2) I don't currently create the dummy ,foo, locking file.

  3) I haven't written any docs yet.

  4) I needed to get a couple of values out of rcsbuf_getkey and
  have shoved them in globals for the moment; I was looking for a
  neater way that wouldn't mean changing all the callers.

  5) I'm worried about the right types to use for file offsets
  in a portable way. (Has anyone tried cvs with rcs files over 2GB?)

The patch is against 1.12.9 which is the version my debian happened to
have.

As I say, suggestions - and experiences welcome.

Dave
 -----Open up your eyes, open up your mind, open up your code -------   
/ Dr. David Alan Gilbert    | Running GNU/Linux on Alpha,68K| Happy  \ 
\ gro.gilbert @ treblig.org | MIPS,x86,ARM,SPARC,PPC & HPPA | In Hex /
 \ _________________________|_____ http://www.treblig.org   |_______/

Attachment: treblig.tagoverwritehack-1.12.9.diff
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]