On Sun, Sep 09, 2007 at 02:02:16PM -0700, Andrew Sackville-West wrote: > On Sun, Sep 09, 2007 at 04:23:42PM -0400, Marty wrote: > > The following script seems to run abnormally slow on a 400Mhz Sarge system, > > getting only about one iteration per second in the while loop. It extracts > > md5sums from a 180k Packages file and makes an indices file. I've narrowed > > down the slowdown to the lines in the while loop starting with > > "search=..." > > how have you determined this? just FTR, I'd put echo "pre-search" or > "post-search" around each search= statement jsut to double check > that. I played with this a bit, and it seems to spend a lot of time > generating useless $search's although that's likely another > issue. What does a sampling of $inputline look like? I wonder if > you're getting much more than one line of the package data for each > $inputline and that results in the grep taking a lot more time than > you'd think. to clarify, you've done something to the normal .bz2 Packages files, I gather (like unzipped them, right?) and perhaps in the process you've mutated them into some other form resulting in more than one line of data being crammed into $inputline. just a thought. A
Attachment:
signature.asc
Description: Digital signature