From 7e35d4a050aeabc2c7f932a738068ccf97a2de63 Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Fri, 25 Mar 2011 21:02:53 +0000 Subject: [PATCH] - more efficient CRC updating in cache thread --- .../shared_lib/sources/platform/common/simple_threads.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/shared_lib/sources/platform/common/simple_threads.cpp b/source/shared_lib/sources/platform/common/simple_threads.cpp index 27e6628f..3eaf6ad6 100644 --- a/source/shared_lib/sources/platform/common/simple_threads.cpp +++ b/source/shared_lib/sources/platform/common/simple_threads.cpp @@ -157,8 +157,8 @@ void FileCRCPreCacheThread::execute() { // Clear existing CRC to force a CRC refresh string pathSearchString = string("/") + techName + string("/*"); const string filterFileExt = ".xml"; - clearFolderTreeContentsCheckSum(techDataPaths, pathSearchString, filterFileExt); - clearFolderTreeContentsCheckSumList(techDataPaths, pathSearchString, filterFileExt); + //clearFolderTreeContentsCheckSum(techDataPaths, pathSearchString, filterFileExt); + //clearFolderTreeContentsCheckSumList(techDataPaths, pathSearchString, filterFileExt); if(getQuitStatus() == true) { break; @@ -166,7 +166,7 @@ void FileCRCPreCacheThread::execute() { if(SystemFlags::VERBOSE_MODE_ENABLED) printf("--------------------- CRC worker thread running for tech [%s] ---------------------------\n",techName.c_str()); if(getQuitStatus() == false) { - int32 techCRC = getFolderTreeContentsCheckSumRecursively(techDataPaths, string("/") + techName + string("/*"), ".xml", NULL); + int32 techCRC = getFolderTreeContentsCheckSumRecursively(techDataPaths, string("/") + techName + string("/*"), ".xml", NULL, true); if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d] cached CRC value for Tech [%s] is [%d] took %.3f seconds.\n",__FILE__,__FUNCTION__,__LINE__,techName.c_str(),techCRC,difftime(time(NULL),elapsedTime)); SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d] cached CRC value for Tech [%s] is [%d] took %.3f seconds.\n",__FILE__,__FUNCTION__,__LINE__,techName.c_str(),techCRC,difftime(time(NULL),elapsedTime));