1
0
Fork 0

DBG: call reference update less frequently

This commit is contained in:
Duncan Ogilvie 2020-02-10 02:59:08 +01:00
parent aac246b27f
commit 1774ba1f89
No known key found for this signature in database
GPG Key ID: FC89E0AAA0C1AAD8
1 changed files with 4 additions and 2 deletions

View File

@ -196,11 +196,13 @@ int RefFindInRange(duint scanStart, duint scanSize, CBREF Callback, void* UserDa
if(initCallBack) if(initCallBack)
Callback(0, 0, &refInfo); Callback(0, 0, &refInfo);
auto percentCount = scanSize / 500;
//concurrency::parallel_for(duint (0), scanSize, [&](duint i) //concurrency::parallel_for(duint (0), scanSize, [&](duint i)
for(duint i = 0; i < scanSize;) for(duint i = 0; i < scanSize;)
{ {
// Print the progress every 4096 bytes // Print the progress every percent
if((i % 0x1000) == 0) if((i % percentCount) == 0)
{ {
// Percent = (current / total) * 100 // Percent = (current / total) * 100
// Integer = floor(percent) // Integer = floor(percent)