mirror of
https://github.com/wolfpld/tracy
synced 2025-04-30 12:53:51 +00:00
Optimize reading plot data.
This commit is contained in:
parent
c0a2e9b3f7
commit
3bb0f33dcc
@ -1093,11 +1093,15 @@ Worker::Worker( FileRead& f, EventType::Type eventMask, bool bgTasks )
|
|||||||
pd->data.reserve_exact( psz, m_slab );
|
pd->data.reserve_exact( psz, m_slab );
|
||||||
if( fileVer >= FileVersion( 0, 5, 2 ) )
|
if( fileVer >= FileVersion( 0, 5, 2 ) )
|
||||||
{
|
{
|
||||||
|
auto ptr = pd->data.data();
|
||||||
int64_t refTime = 0;
|
int64_t refTime = 0;
|
||||||
for( uint64_t j=0; j<psz; j++ )
|
for( uint64_t j=0; j<psz; j++ )
|
||||||
{
|
{
|
||||||
pd->data[j].time.SetVal( ReadTimeOffset( f, refTime ) );
|
int64_t t;
|
||||||
f.Read( pd->data[j].val );
|
f.Read2( t, ptr->val );
|
||||||
|
refTime += t;
|
||||||
|
ptr->time = refTime;
|
||||||
|
ptr++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user