Speed up resizing of app designer gui

4 Ansichten (letzte 30 Tage)
Philipp Soentgerath
Philipp Soentgerath am 10 Okt. 2019
I have a fairly large gui with daisy chained tab groups panels and many individual ui elements. Meanwhile, the time for resizing of the window has become inappropriately big. (>1min).
Inside the tab groups panels are distributed by a grid layout. The auto resize children option is on.
Are there any rules/suggestions how to avoid/debug long resize events?
Using the profile viewer during a resizing leads to this output:
2019-10-10 07_18_40-Profiler.png
Unfortunately this does not help me to improve my gui.
Thanks in advance,

Antworten (1)

Alexandra McClernon Ownbey
Alexandra McClernon Ownbey am 10 Okt. 2019
For a gui, I always manually define the size a location of all my objects. I find it best to use normalized units. If I have several objects, say 3, that I want to distribute evenly within my figure, I just use ratios in the form of fractions for the height.
figure('units','normalized',...
'position',[0.3 0.3 0.3 0.3])
h.but1 = uicontrol('sytle','pushbutton',...
'units','normalized',...
'position',[0 2/3 0.3 1/3],...
'string','button1')
h.but2 = uicontrol('sytle','pushbutton',...
'units','normalized',...
'position',[0 1/3 0.3 1/3],...
'string','button2')
h.but3 = uicontrol('sytle','pushbutton',...
'units','normalized',...
'position',[0 0 0.3 1/3],...
'string','button1')
The position and sizing can always be changed later. I find it sometimes useful to reference the previous size, expecially if you are using uitable. (uitable has a property called 'extend' that lists the extension of the table so you don't have any remaining white space).
h.but1.Position = h.but1.Position + [0 0 0.2 -0.1];
Is this what you were refering to? Or is it something else in your gui that is slowing down resizing the whole figure?
  3 Kommentare
Alexandra McClernon Ownbey
Alexandra McClernon Ownbey am 12 Okt. 2019
Do you have any data stored/plotted in your gui? The GUI may be slow due to the amount of data held; this also goes for a large number of objects in the GUI. Have you also tried running it on a different machine?
Philipp Soentgerath
Philipp Soentgerath am 14 Okt. 2019
During the run time serveral axes and one hugh table are created dynamically, but resizing is equally slow before and after this.
I think the sheer number of elements could be the problem. There are serveral hunderds of them, distributed over 8 tabs. So only ~100 are present in the figure. (Don't know if that helps). All other gui interactions still work fine without a bothering delay.
The problems occurs on every machine (3 pc with very similar configuration) and they are professional workstations.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Migrate GUIDE Apps finden Sie in Help Center und File Exchange

Produkte


Version

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by