MATLAB Answers

2

App Designer's editor is slow and gets stuck alot

Asked by Tor Hadas on 14 Apr 2016
Latest activity Edited by Brad Stiritz on 13 Nov 2019 at 22:22
I started using app designer instead of GUIDE a week ago, and some things really annoy me about it, tho it is beautifull and has a lot to offer.
The first thing is that app designer lack a lot of components and features guide has, like coping figures and adding java components (and no way of inserting html in labels).
Is this going to change in the future, or is this intended?
The second more importent thing is that when my code has more than ~100 lines, app designer's editor turns out to be very slow, and now - when my 'app' has 1k lines of code, app designer is unbearable and when i write something i need to do it in an external editor then paste the code in - which ALSO takes forever.
Litterly, i press Enter and i have to wait 10 seconds for the editor to respond. Pasting takes ~20 second, and writing a full line of code will take me about 10 minutes. No joking.
My task manager pointed out that after i do anything (and the editor is processing), matlab takes ~30% of my CPU and 200MB RAM.
While the editor is processing, it's whole gui is stuck also, meaning I can't close app designer, I can't save my work, I can't do anything.
Those are 'bench' resaults:
What should I do? How can I make app designer faster? And is app designer a beta or something that's gonna have more features in the future?
Thanks.

  0 Comments

Sign in to comment.

14 Answers

Answer by Etienne
on 20 May 2016
 Accepted Answer

FYIW, I was on the line with the helpful people at technical support this morning. The code editor slowdown is a known issue. Over 800 lines of code with the "enable coding alerts" or over 1500 lines without the coding alerts is known to cause a slowdown. Here's what they explained:
  1. 2016b will greatly increase the performance for larger apps. I've been told that the performance up to 5000 lines of codes will be improved. 2016b Pre-release is coming soon.
  2. 2016 or 2017a will enable more components, including tables, which will (for me at least) greatly reduce the number of components, which will reduce the number of command lines, also improving performance.
  3. Coding app methods can be moved to helper classes, which can be coded in the normal matlab editor, which also reduces the number of app designer lines.
Hope this helps

  0 Comments

Sign in to comment.


Answer by J. Webster on 14 Apr 2016

I recently started using App Designer myself.
This is the first time it's been included with a normal installation, so yes, it's still a bit buggy. I consider it a beta release, whether mathworks does or not. I've noticed the unresponsiveness as well, though sometimes restarting matlab will clear it up a bit.
You probably wouldn't want to use it for any "mission critical" projects yet.

  1 Comment

I use it for testing currently. In my pc the app designer is unresponsive everytime I input some code which makes writing impossible. Restarting matlab won't help

Sign in to comment.


Answer by Chris Portal on 15 Apr 2016

Tor, can you go to Code View and try turning off the "Enable app coding alerts" checkbox? See if that helps address the performance issue you are experiencing. And yes, App Designer is under active development so there are many more features in the works.

  2 Comments

I tried that already and to no good.
My current solution is to call functions from a .m file containing all the real code, thus not having to deal with app designer's code editor
Hi Tor,
This is disappointing to hear. I would've expected turning off the alerts would've made a significant improvement. We'd like to investigate this further to better understand what is impacting your app.
If you don't mind sharing your app, could you contact me through my profile so we can arrange a way of getting a copy to troubleshoot and add to our qualification process?
Thanks for all the feedback!

Sign in to comment.


Answer by Hendrik B. on 28 Apr 2016
Edited by Hendrik B. on 28 Apr 2016

I have exactly the same problem. The bigger the program gets, the slower it is. At the moment, it takes almost 10 seconds after I change something in the code.

  2 Comments

One action that has helped alleviate the issue is to go to Code View and turn off the "Enable app coding alerts" checkbox. You'll need to do this every time you open the app though.
I'd also be curious to know how many lines of code you have in the editor.
I already tried that. It is still as slow as it was before. At the moment I have 899 lines of Code and about 63 design elements (spread over 4 Tabs).

Sign in to comment.


Answer by timo
on 27 Aug 2016

On a core i7 laptop with 16 GB of ram around 1200 lines it takes 1 second delay to type ...WTF

  0 Comments

Sign in to comment.


Answer by Chris Portal on 23 Sep 2016

For those who may not be watching the external bug report for this, R2016b addresses most of the issues reported on this thread. I encourage you to try out the R2016b version of App Designer when you're ready to upgrade.

  2 Comments

Yep, I just tried out the App Designer editor for R2016b and it seems to work fine now!
Great to hear Moses! Thanks for the confirmation.

Sign in to comment.


Answer by afalv
on 28 Nov 2017

Non-sense post, but just to keep this thread alive...
The App designer is SLOW!
I have a hell of a machine that can fly to the moon but I cannot write any significant amount of code in the app designer. Now I have 1.5k lines and it feels like I work through remote desktop from Mars.
This is the last time I started a project in the app designer. I just don't want to outsource every little peice of code into a separate function file just because the editor is unable to handle ...code.
I bet the only problem is the poor performance at syntax-highlighting. Can't you just use the Eclipse-Library or something else that works fine for 100k+ lines of code?

  0 Comments

Sign in to comment.


Answer by Etienne
on 13 May 2016
Edited by Etienne
on 13 May 2016

Adding my voice to this problem since even tech support seems to be unaware of the problem.
I have the same problems, I've given up on copy-pasting entirely. Restarting Matlab sometimes helps.
I have no clue why the editor has to be this buggy and laggy - and why can't we just edit the code with the regular editor?

  3 Comments

Actually, the *.mlapp file is simply a zip file in disguise. You can edit the app in an external editor as follow:
  1. Open the *.mlapp file in your favorite zip viewer (e.g., winzip or winrar). You may need to rename/copy the file as *.zip.
  2. Edit the contents of the contained matlab/document.xml file in your favorite text editor (Matlab's editor for example)
  3. Load /appdesigner/appModel.mat into Matlab workspace. This is a struct that holds the information about the uifigure, similar in concept to the *.fig files generated by the old GUIDE. Go to appData.CodeData.EditableSection.Code and update the cell array with the lines of your updated code (one cell element per user-code line).
  4. Do the same with appData.CodeData.GeneratedCode (which holds the same data as appData.CodeData.EditableSection.Code but also including the AppDesigner-generated [non-editable] code.
  5. Save the modified appData struct back into appdesigner/appModel.mat
  6. Update the zip file (*.mlapp) with the updated appModel.mat and document.xml
If you think this is not worth all the effort, then you're probably right. But you must admit that it's a bit fun to poke around...
One day maybe I'll create wrapper utilities ( mlapp2m and m2mlapp ) that do all this automatically, in both directions.
Yair Altman
A word of caution for anyone that tries this undocumented/unsupported poking into their MLAPP file. Taking this approach will almost certainly guarantee your app to not load in one of the subsequent releases. Just something to consider in your off-roading expedition!
For anyone interested, I posted a more detailed version of the information here: http://UndocumentedMatlab.com/blog/appdesigner-mlapp-file-format

Sign in to comment.


Answer by Chris Portal on 5 Aug 2016

FYI, an external bug report has been posted on the MathWorks web site with some more information on this:

  0 Comments

Sign in to comment.


Answer by Valber Cavalcanti on 31 Oct 2017
Edited by Valber Cavalcanti on 31 Oct 2017

To use the Matlab AppDesign is getting terrible experiences for me. After all my programming and designs, the AppDesign re-copy several components that I already delected. Is always slow, and for many times noting works, definitly. I lost hours and days with this AppDesign. It is not fair.

  0 Comments

Sign in to comment.


Answer by Christopher Braunholz on 13 Aug 2018

I got to the point of an unasable App editor (R2017b, Enable app coding alerts is off) now as well. 3500 lines of code seem to be too much... Matlab, please catch up on this!

  0 Comments

Sign in to comment.


Answer by Andrea Carignano on 27 Dec 2018
Edited by Andrea Carignano on 27 Dec 2018

I updated my Matlab from 2017b to 2018b and the performances are significantly worsened.
Editor become unresponsive more frequently and I can no longer copy and paste code because nothing happens when I do this. My app has 7000 lines of code and nothing changes if I enable or disable app coding alerts.
Also debagging has a lot of problems. When I stop at a break-point the command-line takes 4-5 seconds to run a line of code, and then I am not able to continue or quit debugging or save the code.
It is impossible to work this way. I strongly advise to avoid app designer for big projects.

  0 Comments

Sign in to comment.


Answer by scott nolan on 26 Mar 2019

I have been having way too much trouble with this very buggy API/Compiler.
It is slow - very difficult to work with even if you are an experienced programmer ( 35+ yrs here)
it cannot work with activex objects - so you cannot write out your results
so you cannot share your results ( unless you do screen grabs of charts, etc)
and Matlab help desk will not answer questions regarding the API roadmapp - so you cannot determine if it is a waste of time until you invest a lot of wasted time and eventually find all the dead ends.
using 2018b

  0 Comments

Sign in to comment.


Answer by Brad Stiritz on 4 Nov 2019 at 22:21
Edited by Brad Stiritz on 13 Nov 2019 at 22:22

EDIT 11/13/19 : we found that stability is much better in Windows, vs. Linux. We're now only developing Apps in Windows 10, it's a much improved experience!
ORIGINAL POST: A sad update on this thread discussion-- A friend and I are using R2019b. Last week, we started prototyping a very simply design layout. AppDesigner has been slow and buggy. Sometimes it hangs, and we have to restart the Designer after the project is saved or the app is launched.
As a long-time, devoted Matlab user, it's painful to see that AppDesigner stability and usability still hasn't been achieved yet.

  0 Comments

Sign in to comment.