Slow debugging for long scripts
7 ビュー (過去 30 日間)
古いコメントを表示
Hi all
I know that ideally I should try to break up long scripts into smaller components, and I plan on doing that, but for now I have once more reached around 3000 lines in one script and usually that is no problem but for some reason the debugging on this one is incredibly slow. Writing is delayed at times by seconds which is a bit of a nuisance. The problem persists even if the program has not been run which made me think that software could be the problem. I tried updating from 2012b to 2013a thinking that the problem would be resolved but it hasn't been so far.
Any suggestions? (apart from breaking up the script into smaller pieces of course).
Cheers
Jakob
0 件のコメント
回答 (3 件)
Vishal Rane
2013 年 11 月 26 日
Try code folding. Keep only the code that you are working on unfolded. That would improve the code readability, might also require less java memory. Also divide your code into code sections and debug one section at a time rather than the entire file.
0 件のコメント
Simon
2013 年 11 月 26 日
Hi!
You can try to disable the code analyzing feature under "File -> Preferences -> Code Analyzer". Writing should not be delayed then.
Splitting your script in logical parts (using functions for repetetive tasks) is also a good idea, but you know that already ;-)
0 件のコメント
Jakob Sievers
2013 年 11 月 28 日
編集済み: Jakob Sievers
2013 年 11 月 28 日
2 件のコメント
Simon
2013 年 11 月 28 日
As a last (but maybe not very useful) solution you can change the editor in the preferences to something else than the builtin matlab editor. But breaking up the code is far better, even if it takes some time.
参考
カテゴリ
Help Center および File Exchange で Graphics Performance についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!