Re: [PATCH] Optimized cvsexportcommit: calling 'cvs status' only once instead of once per changed file.
- From
Steffen Prohaska <prohaska@zib.de>
- Date
- May 9, 2007, 22:45 UTC
- Message-ID
- <380B28A3-5CD0-4371-A717-1D2629E6302D@zib.de>
- In-Reply-To
- <200705092230.16027.robin.rosenberg.lists@dewire.com>
On May 9, 2007, at 10:30 PM, Robin Rosenberg wrote:
Show 22 quoted lines
> onsdag 09 maj 2007 skrev Steffen Prohaska: >> The old implementation executed 'cvs status' for each file touched by >> the patch >> to be applied. The new code calls 'cvs status' only once and parses >> cvs's >> output to collect status information of all files contained in the >> cvs working >> copy. >> >> Runtime is now independent of the number of modified files. A >> drawback is that >> the new code retrieves status information for all files even if only >> a few are >> touched. The old implementation may be noticeably faster for small >> patches to > > Ouch, lets see now. My working cvs checkout contains ~25k files and > my typical commit touches 5-20 files. > > A quick (well....) test says cvs status on my checkout takes about > five minutes to execute. Compare this with my typical exportcommit > time of about ten seconds.
I tested with ~7k files using ssh to connect. Maybe something's wrong with the server I'm connecting to but it takes some time for each connect. This alone kills the performance for a couple of files.
'cvs -z6 status' on the other hand took only 10 seconds.
> If you really need this, make a switch to select it.
I'll post a patch soon that takes the best of both: Call cvs status once with the list of touched files and parse the output. Only one connection is needed and only the minimal amount of status data is transferred.
- Steffen