MATLAB: How to make the MATLAB GUI start faster

guiguideMATLABstartup

I have a complex GUI that contains many objects. Initializing my GUI takes a long time.

Best Answer

GUI startup times can be improved by setting the Visible property to "off" for any uicontrols that aren't needed on startup. The Visible property can then be set to "on" in the GUI code, when they are needed.
For example, if there are multiple pushbuttons that only need to be available after another button is clicked, then the GUI should start with their Visible property set to "off", and that button's callback function should make those buttons visible:
function pushbutton1_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
set([handles.pushbutton2;
handles.pushbutton3;
handles.pushbutton4;
handles.pushbutton5;
handles.pushbutton6;
handles.pushbutton7;
handles.pushbutton8;
handles.pushbutton9;
handles.pushbutton10],'Visible','on)