Clip child zone list submissions.

This commit is contained in:
Bartosz Taudul 2020-01-31 18:58:31 +01:00
parent 4a6bc284af
commit 5f91b48e0c

View File

@ -6600,7 +6600,10 @@ void View::DrawZoneInfoChildren( const V& children, int64_t ztime )
pdqsort_branchless( cti.get(), cti.get() + cgr.v.size(), [&ctt] ( const auto& lhs, const auto& rhs ) { return ctt[lhs] > ctt[rhs]; } );
for( size_t i=0; i<cgr.v.size(); i++ )
ImGuiListClipper clipper( cgr.v.size() );
while( clipper.Step() )
{
for( auto i=clipper.DisplayStart; i<clipper.DisplayEnd; i++ )
{
auto& cev = a(children[cgr.v[cti[i]]]);
const auto txt = m_worker.GetZoneName( cev );
@ -6629,6 +6632,7 @@ void View::DrawZoneInfoChildren( const V& children, int64_t ztime )
ImGui::ProgressBar( part, ImVec2( -1, ty ), buf );
ImGui::NextColumn();
}
}
ImGui::TreePop();
}
}
@ -6658,7 +6662,10 @@ void View::DrawZoneInfoChildren( const V& children, int64_t ztime )
PrintStringPercent( buf, TimeToString( ztime - ctime ), double( ztime - ctime ) / ztime * 100 );
ImGui::ProgressBar( double( ztime - ctime ) * rztime, ImVec2( -1, ty ), buf );
ImGui::NextColumn();
for( size_t i=0; i<children.size(); i++ )
ImGuiListClipper clipper( children.size() );
while( clipper.Step() )
{
for( auto i=clipper.DisplayStart; i<clipper.DisplayEnd; i++ )
{
auto& cev = a(children[cti[i]]);
const auto txt = m_worker.GetZoneName( cev );
@ -6687,6 +6694,7 @@ void View::DrawZoneInfoChildren( const V& children, int64_t ztime )
ImGui::ProgressBar( part, ImVec2( -1, ty ), buf );
ImGui::NextColumn();
}
}
ImGui::EndColumns();
}
}