summaryrefslogtreecommitdiff
path: root/lib/binary.cpp
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:20:50 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:20:50 +0200
commit7e706cf64654aea466c059c307e5723e2423ed5d (patch)
treee85f0d28d7c81b6d21419fc38e1a654cca2212b1 /lib/binary.cpp
parent5.5 (diff)
downloadFreeFileSync-7e706cf64654aea466c059c307e5723e2423ed5d.tar.gz
FreeFileSync-7e706cf64654aea466c059c307e5723e2423ed5d.tar.bz2
FreeFileSync-7e706cf64654aea466c059c307e5723e2423ed5d.zip
5.6
Diffstat (limited to 'lib/binary.cpp')
-rw-r--r--lib/binary.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/binary.cpp b/lib/binary.cpp
index 4fc1d408..2065e13e 100644
--- a/lib/binary.cpp
+++ b/lib/binary.cpp
@@ -44,7 +44,7 @@ public:
operator size_t() const { return bufSize; }
private:
- static const size_t BUFFER_SIZE_MIN = 128 * 1024;
+ static const size_t BUFFER_SIZE_MIN = 64 * 1024;
static const size_t BUFFER_SIZE_START = 512 * 1024; //512 kb seems to be a reasonable initial buffer size
static const size_t BUFFER_SIZE_MAX = 16 * 1024 * 1024;
@@ -72,9 +72,6 @@ const std::int64_t TICKS_PER_SEC = ticksPerSec();
bool zen::filesHaveSameContent(const Zstring& filename1, const Zstring& filename2, CompareCallback& callback)
{
- FileInput file1(filename1); //throw FileError
- FileInput file2(filename2); //throw FileError
-
static boost::thread_specific_ptr<std::vector<char>> cpyBuf1;
static boost::thread_specific_ptr<std::vector<char>> cpyBuf2;
if (!cpyBuf1.get())
@@ -85,6 +82,9 @@ bool zen::filesHaveSameContent(const Zstring& filename1, const Zstring& filename
std::vector<char>& memory1 = *cpyBuf1;
std::vector<char>& memory2 = *cpyBuf2;
+ FileInput file1(filename1); //throw FileError
+ FileInput file2(filename2); //
+
BufferSize bufferSize;
UInt64 bytesCompared;
bgstack15