Is Matlab working on speeding up the editor with large .m files?

1 view (last 30 days)
I find it very convenient to code using nested functions and code folding. Unfortunately, the current editor gets too bogged down when parsing this file for all the features in Mtree. This causes me to split out the functions into separate files, which makes it more difficult to debug and version control. If the parsing can't be sped up, could you make it manual? So we could take it off automatic and press an update button when we are done updating the code in a large file.
Thanks,

Accepted Answer

Sean de Wolski
Sean de Wolski on 24 Jun 2015
Matt, See this thread:
The suggestion to use exit, helps a fair amount.

More Answers (3)

Steven Lord
Steven Lord on 24 Jun 2015
In general we don't discuss what we're working on. In this specific case, I have two suggestions:
  • Temporarily disable integrated warnings and errors in the Code Analyzer Preferences and/or disable code folding in the Editor/Debugger Preferences (Preferences item in the Environment section of the Home tab.) Reenable those preferences or use CHECKCODE to check for potential problems or improvements.
  • If there are specific constructs or coding techniques that you've found causes the Editor to slow down more than others, please contact Technical Support to let them know about these patterns so they can report them to the development staff (and inform you of any known workarounds or solutions.)

Matt Forthofer
Matt Forthofer on 24 Jun 2015
It does speed it up to turn off the code folding and code checking, but that defeats the purpose. The convenience comes from having all the nested functions and being able to fold them up for readability. Then I just unfold the one I'm working on.
I haven't noticed a specific coding situation that is worse than others, it just starts to really slow down after 10k lines. I'm running 38k lines now and it is pretty difficult to deal with due to the editor delay. I know I'll have to split things out to make it faster with this editor, but I wish I didn't have to. It would be nice to keep everything in one file. The file is only 1.5 MB in size. I do not like having dozens of .m files to deal with.
This is why it would be great if a manual option were available. When run, it would place all the folding and formatting, then new text would just be black until manually updated.
Thanks,

Matt Forthofer
Matt Forthofer on 24 Jun 2015
Yes, that does help. It is somewhat like the manual update option I'm looking for. It is just not quite as convenient as a button would be. Thanks!
  2 Comments
Sean de Wolski
Sean de Wolski on 24 Jun 2015
You could automate it with fopen/fwrite/fclose and stick it in a shortcut. How's that for hacky/kludgy/awful!
Sean de Wolski
Sean de Wolski on 24 Jun 2015
Also, please use a comment when replying to a specific answer rather than a new answer.

Sign in to comment.

Categories

Find more on Debugging and Analysis in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!