mirror of
https://github.com/wolfpld/tracy
synced 2025-05-03 06:03:51 +00:00
Optimize ptr walking.
This commit is contained in:
parent
18f7d8c261
commit
0770ed8ee6
@ -512,9 +512,9 @@ close:
|
|||||||
|
|
||||||
void View::DispatchProcess( const QueueItem& ev, char*& ptr )
|
void View::DispatchProcess( const QueueItem& ev, char*& ptr )
|
||||||
{
|
{
|
||||||
ptr += QueueDataSize[ev.hdr.idx];
|
|
||||||
if( ev.hdr.type == QueueType::CustomStringData || ev.hdr.type == QueueType::StringData || ev.hdr.type == QueueType::ThreadName || ev.hdr.type == QueueType::PlotName || ev.hdr.type == QueueType::SourceLocationPayload )
|
if( ev.hdr.type == QueueType::CustomStringData || ev.hdr.type == QueueType::StringData || ev.hdr.type == QueueType::ThreadName || ev.hdr.type == QueueType::PlotName || ev.hdr.type == QueueType::SourceLocationPayload )
|
||||||
{
|
{
|
||||||
|
ptr += sizeof( QueueHeader ) + sizeof( QueueStringTransfer );
|
||||||
uint16_t sz;
|
uint16_t sz;
|
||||||
memcpy( &sz, ptr, sizeof( sz ) );
|
memcpy( &sz, ptr, sizeof( sz ) );
|
||||||
ptr += sizeof( sz );
|
ptr += sizeof( sz );
|
||||||
@ -543,6 +543,7 @@ void View::DispatchProcess( const QueueItem& ev, char*& ptr )
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
ptr += QueueDataSize[ev.hdr.idx];
|
||||||
Process( ev );
|
Process( ev );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user