App Designer is really slow while running on "Test Bench"

17 次查看(过去 30 天)
Hello,
I'm currently developing a GUI with MATLAB App Designer, and now that i have it pretty much finished and debugged, when it runs on test bench (I haven't turned it to .exe yet) it works really slow. So I would like to know why this is happening. A few things that may help:
  • The App connects to a CAN Bus (Connected to a BMS) via peak and to a relay pcb. From the CAN bus, it desplays all the data required using EditFields and others like Gauge.
  • It also works as a little System Manager as, depending on the data inputs and the callbacks, it carries out different functionalities, such as actuing on the relays.
  • The App has a lot of objects like Edit Fields, LEDs, Gauges and I am using the toolbar to have mutiple windows (a total of 9)
  • It only has 4 buttons which are the only callback in the App.
  • To recieve the data, display it, carrie out the different functionalities and other stuff I'm using multiple timer functions (a total of 10) that may run at the same time.
I'm guessing that, using all this stuff toghether is what makes the app work slowly, so I'd like to ask if there are any processed or procedures to make it go faster, such as using functions in different files.
Thank you very much.

回答(1 个)

Ashutosh Thakur
Ashutosh Thakur 2023-12-15
Hi Eduard
I can understand that you are facing performance issues with your GUI developed using MATLAB App Designer.
Kindly follow these suggestion which can help in improving the performance of the Application:
  • Try to analyze if you can minimize some components in your GUI and try to componentize as much as possible.
  • If their are multiple windows or tabs present in the app, you can try to load those windows or tabs only when they are active in this way you can improve the performance.
  • If their is some computation which does not depend on real time data, you can try to precompute them and store them in MATLAB variables so that computation overhead can be reduced.
  • You can also try to use Parallel Computing Toolbox to parallelize certain operations in MATLAB.
  • You can use MATLABs in-built profiler to profile your code and find bottlenecks and work on improving them.
You can also refer to the following documentation links to work on above suggestions:
I hope this helps you in resolving the issue.

类别

Help CenterFile Exchange 中查找有关 Downloads 的更多信息

产品


版本

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by