]> git.wh0rd.org Git - dump.git/commitdiff
Do not seek for every dump block, only for each ntrec blocks.
authorStelian Pop <stelian@popies.net>
Wed, 27 Feb 2002 09:47:48 +0000 (09:47 +0000)
committerStelian Pop <stelian@popies.net>
Wed, 27 Feb 2002 09:47:48 +0000 (09:47 +0000)
CHANGES
dump/tape.c

diff --git a/CHANGES b/CHANGES
index 776bedf9e740ef84b6a4719cef1c85692bd65ea2..d073757d51b68d6b25e61a611b69d04f7393b5c6 100644 (file)
--- 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 <ard@waikato.ac.nz> 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 <ard@waikato.ac.nz> for
+       reporting this issue.
+
 Changes between versions 0.4b26 and 0.4b27 (released February 15, 2002)
 =======================================================================
 
index 125b15884074869ed1d7b4b4adcf0c58bfcf18f0..97565d1522975e6f7ebc97ad8478eebb5c9dcd07 100644 (file)
@@ -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 <config.h>
@@ -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);
                                }
                        }
                }