|
|
|
|
||||||
| linux.debian.user debian-user@lists.debian.org. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
On Sunday 09 September 2007, Andrew Sackville-West wrote:
> On Sun, Sep 09, 2007 at 05:35:12PM -0400, Marty wrote: > > 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? > > > > I checked the output rate by outputing to stdout (instead of piping to > > gzip after the "done" statement). I also timed it with the "time" > > command. > > but, That only tells you how long it takes to iterate through the loop > to get to the gzip command, not how much time is spent in each > statement. > > smth like: > > while read inputline > do echo "input line is " $inputline > search=`grep...` > echo "search is " $search" > if... > echo "we got a good search" > fi > ... > done how about ``set -x'' and let the shell do it for you ? -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
On Mon, Sep 10, 2007 at 04:30:26PM +0200, Thomas Jollans wrote:
> > how about ``set -x'' and let the shell do it for you ? d'oh... A -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFG5XcnaIeIEqwil4YRAuAeAJsGTI8qK3CcQC9KtxdwR7 d2lXfdNQCfXdY5 tG0xKyajIRG+AtP+omuYaKI= =uX0K -----END PGP SIGNATURE----- |
|
![]() |
| Outils de la discussion | |
|
|