MATLAB: Large files, very slow editor, no fix

cell modeeditorlatencyMATLABnested functionsslow editor

Changes to the editor in R2011 have dramatically slowed down the editor when working with large m-files (e.g. 1000's of lines). I have been in correspondence with support staff, who tell me to disable cell mode and break up the file into smaller files.
Disabling cell mode does help somewhat, but there is still a lot of latency while typing. It can be several seconds to see what was typed. Even scrolling is choppy.
So the next step is break up the large file. But here's the problem. Most of the functions within the file are nested functions, which share the scope of the parent functions. How do I move the nested functions to separate files and maintain the behavior of nested functions?

Best Answer

Try also increasing the size of the Java heap. File -> Preferences -> General -> Java Heap Memory. It may not help, depending on where the time is being spent, but it's worth a shot.