Commits

Billy O'Neal committed 8f14f04

Large performance increase for hashing functions.

Comments (0)

Files changed (2)

pevFind/pevFind.vcxproj

     </ClCompile>
     <Link>
       <AdditionalDependencies>wintrust.lib;shlwapi.lib;Sfc.lib;Version.lib;Userenv.lib;cryptlib.lib;%(AdditionalDependencies)</AdditionalDependencies>
-      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
       <SubSystem>Console</SubSystem>
       <OptimizeReferences>true</OptimizeReferences>
       <EnableCOMDATFolding>true</EnableCOMDATFolding>
     </ClCompile>
     <Link>
       <AdditionalDependencies>wintrust.lib;shlwapi.lib;Sfc.lib;Version.lib;Userenv.lib;cryptlib.lib;%(AdditionalDependencies)</AdditionalDependencies>
-      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
       <SubSystem>Console</SubSystem>
       <OptimizeReferences>true</OptimizeReferences>
       <EnableCOMDATFolding>true</EnableCOMDATFolding>

pevLib/fileData.h

 	return getVersionInformationString(L"SpecialBuild");
 }
 
-
 template <typename hashType> 
 std::wstring FileData::getHash() const
 {
 	hashType hash;
 	DWORD bytesRead = 0;
 	std::vector<unsigned char> buffer;
-	DWORD bytesToAttempt = 1024*1024*1024; //1MB
+	DWORD bytesToAttempt = 1024*1024*4; //4MB
 	buffer.resize(bytesToAttempt);
 	while (ReadFile(file,&buffer[0],bytesToAttempt,&bytesRead,NULL))
 	{