UI graphics objects taking several minutes to update when running App Designer application, can I speed this process up?
2 次查看(过去 30 天)
显示 更早的评论
My application uses an app.Button to execute approximately 80-90 lines of code for importing data from a spreadsheet. I have learned that the import code within the ButtonPushed(app, event) function itself runs very quickly (1.5-2 seconds), but for the UI of application to update (app.EditTextField, and app.ListBox.Items being updated) with the newly imported information takes over two minutes.
I have pinpointed the slowdown using the profile on, profile viewer, functions (see images below), but don't have a strong enough programming background to interpret. Can anyone advise on how to potentially improve the update speed of my application graphics?
![ProcessDTS_Snip4.PNG](https://www.mathworks.com/matlabcentral/answers/uploaded_files/232359/ProcessDTS_Snip4.png)
![ProcessDTS_Snip6.PNG](https://www.mathworks.com/matlabcentral/answers/uploaded_files/232360/ProcessDTS_Snip6.png)
![ProcessDTS_Snip5.PNG](https://www.mathworks.com/matlabcentral/answers/uploaded_files/232361/ProcessDTS_Snip5.png)
See previous thread for some added context (https://www.mathworks.com/matlabcentral/answers/474320-tic-toc-apear-to-be-reporting-incorrect-times-when-called-in-app-designer-button-callback).
0 个评论
回答(2 个)
Harsha Priya Daggubati
2019-8-8
Hi,
It would be more helpful if you could provide information about what type of data are you trying to load into AppDesigner. One guess would be you are loading a very large numeric data loaded. If that's the case, you try simplifying the data by assocating an id with real data to avoid processing the whole lot of data.
Hope this helps!
Harsha Priya Daggubati
2019-8-9
It would be helpful if you can share the MATLAB Code and the type of data you are loading from spreadsheet. As you mentioned that you are updating EditTextField.Value, Lamp.Color, and ListBox.Items, I think none of those properties accept a numeric value with 15 columns.Also, edit field value and listbox items only accept char array/cellstr and Strings.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Develop Apps Using App Designer 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!