From 6c8b464ab6bbfa954c7770df135ea5621250045b Mon Sep 17 00:00:00 2001 From: Stelian Pop Date: Wed, 27 Feb 2002 09:47:48 +0000 Subject: [PATCH] Do not seek for every dump block, only for each ntrec blocks. --- CHANGES | 7 ++++++- dump/tape.c | 12 ++++++++---- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/CHANGES b/CHANGES index 776bedf..d073757 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,4 @@ -$Id: CHANGES,v 1.165 2002/02/25 13:54:52 stelian Exp $ +$Id: CHANGES,v 1.166 2002/02/27 09:47:48 stelian Exp $ Changes between versions 0.4b27 and 0.4b28 (released ?????????????????) ======================================================================= @@ -18,6 +18,11 @@ Changes between versions 0.4b27 and 0.4b28 (released ?????????????????) version...). Thanks to Andrew Donkin for reporting the build failures. +4. Fixed a performance problem with the QFA file creation in + dump, which made unnecessary seeks on the tape slowing down + the dump. Thanks to Andrew Donkin for + reporting this issue. + Changes between versions 0.4b26 and 0.4b27 (released February 15, 2002) ======================================================================= diff --git a/dump/tape.c b/dump/tape.c index 125b158..97565d1 100644 --- a/dump/tape.c +++ b/dump/tape.c @@ -41,7 +41,7 @@ #ifndef lint static const char rcsid[] = - "$Id: tape.c,v 1.63 2002/02/21 09:25:31 stelian Exp $"; + "$Id: tape.c,v 1.64 2002/02/27 09:47:48 stelian Exp $"; #endif /* not lint */ #include @@ -1234,6 +1234,7 @@ doslave(int cmd, int slave_number, int first) #ifdef USE_QFA if (gTapeposfd >= 0) { int i; + int firstpass = 1; for (i = 0; i < ntrec; ++i) { uspclptr = (union u_spcl *)&slp->tblock[i]; spclptr = &uspclptr->s_spcl; @@ -1243,10 +1244,13 @@ doslave(int cmd, int slave_number, int first) (spclptr->c_date == gThisDumpDate)) { /* if an error occured previously don't * try again */ - if (gtperr == 0) { - if ((gtperr = GetTapePos(&curtapepos)) == 0) - MkTapeString(spclptr, curtapepos); + if (firstpass) { + firstpass = 0; + if (gtperr == 0) + gtperr = GetTapePos(&curtapepos); } + if (gtperr == 0) + MkTapeString(spclptr, curtapepos); } } } -- 2.39.5