How to improve speed of app designer?

Dear all,
I created an app which includes 1 file .mlapp (~2.5k lines) and 11 other function files .m.
This App read csv files, analyzes and virualize data to plots and uidata table.
Because there are many callback functions (18 functions), so it seem slow, and sometimes gets stuck, freeze.
I would like to improve by separates functions to other file (function or class file).
But I am wondering about 2 problems:
  • How to instead properties of app designer to other class file? and callbacks
  • It's really improves speed?
Do anyone have ideas??

5 Commenti

cr
cr il 19 Dic 2022
You might want to share the app here for others to identify causes and suggest. Did you try profiler to identify bottlenecks? Does the app do any realtime stuff? Did you make a guide version of it and found it any better?
For general advice and examples for how to create a GUI (and avoid using GUIDE), have look at this thread.
I haven't heard that splitting large files improves performance, but only 18 functions over several thousand lines of code is very suspicious to me.
Thank you for your answers.
I heard that if app designer greater than 1500 lines, it will run slow. I am not sure that if it is true or not.
I can't share.
I wonder that is there time out functions which if stuck, freeze, time out off, app will return previous state?
I don't see adding meta-programming that need to check for a freeze doing any good. You can add a time-out, but on slow computers that will break execution.
My inital concern about only 18 function for several thousand lines of code still remains. For me that is a code smell.
You could try extracting the bulk of the code to external files. That seems an easy thing to try.
"I heard that if app designer greater than 1500 lines, it will run slow. I am not sure that if it is true or not."
False.

Accedi per commentare.

Risposte (0)

Categorie

Prodotti

Release

R2019b

Richiesto:

il 19 Dic 2022

Commentato:

il 20 Dic 2022

Community Treasure Hunt

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

Start Hunting!

Translated by