1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 20:42:21 +02:00

Improve OpenHotPaths

This commit is contained in:
Brian Fiete 2024-02-25 16:43:16 -05:00
parent 59f2451cf9
commit b609ff68b1

View file

@ -353,15 +353,15 @@ namespace IDE.ui
void OpenHot(ListViewItem lvi, int32 minSamples)
{
lvi.WithItems(scope (childItem) =>
for (ListViewItem childItem in lvi.mChildItems)
{
var profileListViewItem = childItem as ProfileListViewItem;
if ((profileListViewItem.mSelfSamples + profileListViewItem.mChildSamples >= minSamples) && (profileListViewItem.IsParent))
{
var profileListViewItem = childItem as ProfileListViewItem;
if ((profileListViewItem.mSelfSamples + profileListViewItem.mChildSamples >= minSamples) && (profileListViewItem.IsParent))
{
profileListViewItem.Open(true, true);
OpenHot(childItem, minSamples);
}
});
profileListViewItem.Open(true, true);
OpenHot(childItem, minSamples);
}
}
}
public void Show(int32 threadId, StringView threadName)
@ -463,7 +463,7 @@ namespace IDE.ui
curItem = newItem;
}
OpenHot(mListView.GetRoot(), (.)(totalSamples * 0.05f));
OpenHot(mListView.GetRoot(), (.)(totalSamples * 0.1f));
}
public void Add(DbgProfiler profiler)