@@ -777,20 +777,32 @@ size_t EasyTreeWidgetLoader::setTreeInternalPlain(const ::profiler::BlocksTreeRo
777
777
{
778
778
++total_items;
779
779
780
+ size_t children_items_number = 0 ;
781
+ ::profiler::timestamp_t children_duration = 0 ;
782
+ if (!child.children .empty ())
783
+ {
784
+ children_items_number = setTreeInternalPlain (_threadRoot, _firstCswitch, _beginTime, child.children , _frame, _frame, _left, _right, _strict, children_duration, _colorizeRows, _addZeroBlocks, _units);
785
+ if (interrupted ())
786
+ break ;
787
+ }
788
+
780
789
if (it->second != nullptr && child.per_frame_stats != nullptr )
781
790
{
782
791
auto item = it->second ;
783
792
784
- auto children_duration = calculateChildrenDurationRecursive (child.children , it->first );
785
- auto self_duration = item->data (COL_SELF_DURATION, Qt::UserRole).toULongLong () - children_duration;
793
+ // auto children_duration = calculateChildrenDurationRecursive(child.children, it->first);
794
+ if (children_duration != 0 )
795
+ {
796
+ auto self_duration = item->data (COL_SELF_DURATION, Qt::UserRole).toULongLong () - children_duration;
786
797
787
- int percentage = 100 ;
788
- if (child.per_frame_stats ->total_duration > 0 )
789
- percentage = ::profiler_gui::percent (self_duration, child.per_frame_stats ->total_duration );
798
+ int percentage = 100 ;
799
+ if (child.per_frame_stats ->total_duration > 0 )
800
+ percentage = ::profiler_gui::percent (self_duration, child.per_frame_stats ->total_duration );
790
801
791
- item->setTimeSmart (COL_SELF_DURATION, _units, self_duration);
792
- item->setData (COL_SELF_DURATION_PERCENT, Qt::UserRole, percentage);
793
- item->setText (COL_SELF_DURATION_PERCENT, QString::number (percentage));
802
+ item->setTimeSmart (COL_SELF_DURATION, _units, self_duration);
803
+ item->setData (COL_SELF_DURATION_PERCENT, Qt::UserRole, percentage);
804
+ item->setText (COL_SELF_DURATION_PERCENT, QString::number (percentage));
805
+ }
794
806
795
807
bool hasContextSwitch = false ;
796
808
::profiler::timestamp_t idleTime = 0 ;
0 commit comments