[Box Backup-commit] COMMIT r1334 - box/chris/general/bin/bbstored

boxbackup-dev at fluffy.co.uk boxbackup-dev at fluffy.co.uk
Sat Mar 3 22:10:44 GMT 2007


Author: chris
Date: 2007-03-03 22:10:44 +0000 (Sat, 03 Mar 2007)
New Revision: 1334

Modified:
   box/chris/general/bin/bbstored/BackupContext.cpp
Log:
Use buffered streams when reading directories to reduce I/O


Modified: box/chris/general/bin/bbstored/BackupContext.cpp
===================================================================
--- box/chris/general/bin/bbstored/BackupContext.cpp	2007-03-03 22:10:03 UTC (rev 1333)
+++ box/chris/general/bin/bbstored/BackupContext.cpp	2007-03-03 22:10:44 UTC (rev 1334)
@@ -25,6 +25,7 @@
 #include "RaidFileController.h"
 #include "FileStream.h"
 #include "InvisibleTempFileStream.h"
+#include "BufferedStream.h"
 
 #include "MemLeakFindOn.h"
 
@@ -306,7 +307,8 @@
 	std::auto_ptr<BackupStoreDirectory> dir(new BackupStoreDirectory);
 	
 	// Read it from the stream, then set it's revision ID
-	dir->ReadFromStream(*objectFile, IOStream::TimeOutInfinite);
+	BufferedStream buf(*objectFile);
+	dir->ReadFromStream(buf, IOStream::TimeOutInfinite);
 	dir->SetRevisionID(revID);
 			
 	// Make sure the size of the directory is available for writing the dir back




More information about the Boxbackup-commit mailing list