bug-cvs
[Top][All Lists]
Advanced

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

RE: Proposed branch tag performance patch for feature and stable release


From: Kelly F. Hickel
Subject: RE: Proposed branch tag performance patch for feature and stable releases
Date: Tue, 16 May 2006 07:06:19 -0500

> -----Original Message-----
> From: mdb@juniper.net [mailto:mdb@juniper.net] On Behalf Of Mark D.
> Baushke
> Sent: Tuesday, May 16, 2006 6:51 AM
> To: Kelly F. Hickel
> Cc: bug-cvs@nongnu.org
> Subject: Re: Proposed branch tag performance patch for feature and
> stable releases
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Kelly F. Hickel <kfh@mqsoftware.com> writes:
> 
> > I just realized that I left out the strncmp!
> 
> Yup.
> 
> > I've added it to the outline below, along with
> > some examples).....
> 
> > -Kelly
> >
> > > -----Original Message-----
> > > From: Kelly F. Hickel
> > > Sent: Monday, May 15, 2006 11:10 AM
> > > To: Mark D. Baushke
> > > Cc: bug-cvs@nongnu.org
> > > Subject: RE: Proposed branch tag performance patch for feature and
> stable
> > > releases
> > >
> > > Mark,
> > >   I've been thinking about how to solve
> > > this, how does the proposed pseudo-code below
> > > sound? This seemed like a heavy approach given
> > > the fact that it's creating and sorting a new
> > > list, but it seems the best way to find the
> > > correct magic revision number in an efficient
> > > way. For low branch counts the list will be
> > > small enough that it should still perform well
> > > compared to the current code.
> > >
> > > findnextmagicrev (given current rev to branch,
> > > ex: 1.1):
> 
> > > 1)  Determine number of dots (numdots) in the
> > > current revision (ex: 1)
> 
> > > 2) Create a new list that will receive the
> > > integer values of the last term of each tag
> > > that might conflict with the candidate.
> 
> > > 3)  Walk the list of RCS_symbols:
> 
> > >     a) if the rev has numdots+1 (ex: 2
> > > "1.1.12") AND the strings are identical up to
> > > the numdots+1 dot (ex: strncmp("1.1.0.2",
> > > "1.1.12", 3) AND the final term is even,
> > > insert the integer value of the final term
> > > into the list.
> 
> To be honest, I might consider using the funciton
> strstr as I am not at all certain I understand how
> you intend to use numbdots+1 in a strncmp()
> function call.

[Kelly F. Hickel] It was just shorthand, I would have figured out the
length up to the dot I'm looking for.

> 
> > >     b) if the rev has numdots+2 (ex: 2
> > > "1.1.0.4") AND the strings are identical up to
> > > the numdots+2 dot (ex: strncmp("1.1.0.2",
> > > "1.1.12", 5) AND the final term is an even
> > > number, AND the term before the final term
> > > matches RCS_MAGIC_BRANCH, insert the integer
> > > value of the final term into the list.
> 
> So, if you observed the following tags
> 
>     q:1.23.0.10
>     p:1.23.0.4
>     o:1.1.12.1.0.4002
>     n:1.1.0.18
>     m:1.1.14.22.0.2
>     l:1.1.14.22.0.4
>     k:1.1.0.14
>     j:1.1.12.1.0.4
>     i:1.1.0.10
>     h:1.1.0.1000
>     g:1.1.8.1.0.2
>     f:1.1.0.8
>     e:1.1.0.6
>     d:1.1.0.4
>     c:1.1.0.2
>     b:1.1.0.2000
>     a:1.1.1.1.0.2

[Kelly F. Hickel] What's the significance of the letters before the
colon in the tags above? Is that the symbolic name of the tag, or
something else? 


> 
> for a particular RCS file, what magic branch
> revision would your programv generate as the next
> revision for each of the given revisions:
> 
>   1.1.1.2
>   1.1
>   1.24
>   1.1.2000.1
>   1.1.18.12
> 
> are you able to make any assumptions about the
> existence of tags like:
> 
>  aa:1.1.2.23
>  ab:1.1.12.14
>  ac:1.23.2.16
>  ad:1.1.6.1
> 
> > > 4) Call sortlist on the list, sorting it into
> > > ascending order of integer values.
> 
> > > 5) go through the list, find the first gap,
> > > that's the new magic revision number.
> > >
> > > Then I'll have to figure out enough of
> > > sanity.sh to add a test case for the old code,
> > > make sure the released codes passes, and that
> > > my previous patch fails, and that the new
> > > patch passes.
> 
>       -- Mark
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.3 (FreeBSD)
> 
> iD8DBQFEabyrCg7APGsDnFERAnKoAKDLPCK0iynOtWJYTNXN3c7atN+9KgCg3q0D
> nb9hj1SX1TZdlhJ4kY/6ofI=
> =ioDw
> -----END PGP SIGNATURE-----

-Kelly







reply via email to

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