- performance changes... (problem found by titi) most debug calls line are skipped when the debug flag is disabled even BEFORE getting into the handledebug method.

This improves performance VERY MUCH.
This commit is contained in:
Mark Vejvoda
2011-03-28 03:54:23 +00:00
parent 453e5a12e6
commit 3b56aa4475
58 changed files with 1573 additions and 2312 deletions

View File

@@ -186,7 +186,7 @@ bool Checksum::addFileToSum(const string &path) {
int32 Checksum::getSum() {
if(fileList.size() > 0) {
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] fileList.size() = %d\n",__FILE__,__FUNCTION__,__LINE__,fileList.size());
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] fileList.size() = %d\n",__FILE__,__FUNCTION__,__LINE__,fileList.size());
Checksum newResult;
for(std::map<string,int32>::iterator iterMap = fileList.begin();
@@ -197,8 +197,6 @@ int32 Checksum::getSum() {
Checksum fileResult;
fileResult.addFileToSum(iterMap->first);
Checksum::fileListCache[iterMap->first] = fileResult.getSum();
//SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] iterMap->first [%s] has CRC [%d]\n",__FILE__,__FUNCTION__,__LINE__,iterMap->first.c_str(),Checksum::fileListCache[iterMap->first]);
}
newResult.addSum(Checksum::fileListCache[iterMap->first]);
}