Don't compress thread twice, if it's the same.

This commit is contained in:
Bartosz Taudul 2018-04-29 02:04:51 +02:00
parent fdaebc2bd8
commit 868fbace5a

View File

@ -524,11 +524,17 @@ Worker::Worker( FileRead& f, EventType::Type eventMask )
f.Read( &mem->size, sizeof( mem->size ) );
f.Read( &mem->timeAlloc, sizeof( mem->timeAlloc ) );
f.Read( &mem->timeFree, sizeof( mem->timeFree ) );
uint64_t t;
f.Read( &t, sizeof( t ) );
mem->threadAlloc = CompressThread( t );
f.Read( &t, sizeof( t ) );
mem->threadFree = CompressThread( t );
uint64_t t[2];
f.Read( t, sizeof( t ) );
mem->threadAlloc = CompressThread( t[0] );
if( t[0] == t[1] )
{
mem->threadFree = mem->threadAlloc;
}
else
{
mem->threadFree = CompressThread( t[1] );
}
if( mem->timeFree < 0 )
{