Why does a checkbox UI Tree take so much longer to populate the widget than a normal UI Tree?

2 ビュー (過去 30 日間)
Austin Burritt
Austin Burritt 2022 年 6 月 8 日
編集済み: Austin Burritt 2022 年 6 月 8 日
I have a uitree that is displaying over 9000 parameters. The widget for the uitree that is displayed takes ~6 seconds to populate as a normal ui tree (which already feels like a very long time to take to load), compared to 1 minute and 55 seconds for a checkbox ui tree to populate the exact same data.
Also, this time is not captured within script runtime using tic and toc. The script is considered "finished" and then the times mentioned above are how long it takes for the opened figure to actually popuate the parameters to the ui tree widget.
example of my code that creates the tree:
f = uifigure();
tree = uitree(f, 'checkbox');
for family=string(parameterTable.Properties.VariableNames)
newFamilyNode = uitreenode(tree,'Text', family);
params = string(parameterTable.(family));
params = rmmissing(params);
for i=1:length(params)
newParamNode = uitreenode(newLruNode,'Text', params{i});
end
end

回答 (0 件)

製品


リリース

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by