mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-23 06:44:35 +00:00
Optimize lock drawing.
Don't iterate over locks that are present in only one thread, if only contended lock events are to be displayed. Such locks cannot be contended.
This commit is contained in:
parent
e8d9de2f77
commit
9563c8316d
@ -3128,6 +3128,7 @@ int View::DrawLocks( uint64_t tid, bool hover, double pxns, const ImVec2& wpos,
|
||||
{
|
||||
const auto& lockmap = v.second;
|
||||
if( !lockmap.valid || !Vis( &lockmap ).visible ) continue;
|
||||
if( m_onlyContendedLocks && lockmap.threadList.size() == 1 && m_lockInfoWindow != v.first ) continue;
|
||||
|
||||
auto it = lockmap.threadMap.find( tid );
|
||||
if( it == lockmap.threadMap.end() ) continue;
|
||||
|
Loading…
Reference in New Issue
Block a user