OSDN Git Service

PATCH: [ 1236623 ] Increase Quick contents compare buffer size
authorKimmo Varis <kimmov@gmail.com>
Tue, 19 Jul 2005 21:00:44 +0000 (21:00 +0000)
committerKimmo Varis <kimmov@gmail.com>
Tue, 19 Jul 2005 21:00:44 +0000 (21:00 +0000)
Src/DiffWrapper.cpp
Src/readme.txt

index 1c71420..497df44 100644 (file)
@@ -47,7 +47,8 @@ static char THIS_FILE[] = __FILE__;
 extern int recursive;
 extern CLogFile gLog;
 static int f_defcp = 0; // default codepage
-static const int MEG = 1024 * 1024; // Mega(byte)
+static const int KILO = 1024; // Kilo(byte)
+static const int MEG = 1024 * KILO; // Mega(byte)
 
 /**
  * @brief Limit for compare by contents/quick contents.
@@ -57,6 +58,11 @@ static const int MEG = 1024 * 1024; // Mega(byte)
  */
 static const int CMP_SIZE_LIMIT = 2 * MEG;
 
+/**
+ * @brief Quick contents compare's file buffer size
+ */
+static const int WMCMPBUFF = 32 * KILO;
+
 static void GetComparePaths(CDiffContext * pCtxt, const DIFFITEM &di, CString & left, CString & right);
 static inline BOOL isBinaryBuf(char * bufBegin, char * bufEnd);
 
@@ -1645,9 +1651,6 @@ struct FileHandle
        FILE * m_fp;
 };
 
-// TODO: Increase WMCMPBUFF (it is set low to help shake out bugs)
-#define WMCMPBUFF 64
-
 /** @brief Compare two specified files, byte-by-byte */
 int DiffFileData::byte_compare_files()
 {
index e75d6fc..3ab86b5 100644 (file)
@@ -1,6 +1,8 @@
 2005-07-19 Kimmo
  PATCH: [ 1238194 ] Use proper member names in MergeDiffDetailView
   Src: MergeDiffDetailView.cpp MergeDiffDetailView.h
+ PATCH: [ 1236623 ] Increase Quick contents compare buffer size
+  Src: DiffWrapper.cpp
 
 2005-07-18 Perry
  BUG: [ 1232382 ] Inconsistent language name casing in Spanish UI (v2.3.4.0)