Matlab App very slow
古いコメントを表示
Hi everyone.
I created a simple App in Matlab, which unfortunately is very slow. Consider you have a document consisting of a couple of sentences, given in a sting array.
The app now lists the individual sentences one below the other. For each sentence there are 18 buttons with which you can classify the sentences. If, for example, a document has 3 sentences, the total number of buttons is 54. If i run the app with 19 sentences, it takes ~45 seconds until I can use it. It also reacts very slow to changes on the window size.
What am i doing wrong? Is it a problem that I have too many buttons?
Thank you in advance for your help!
4 件のコメント
Mario Malic
2021 年 2 月 4 日
19x18 is quite a decent amount of buttons, which makes it not a simple app. Did you create a StartupFcn that does something when you start your program? If yes, try commenting some of the code and see if it will load faster. Maybe you have some inefficiency in your code.
Moritz Scherrmann
2021 年 2 月 4 日
編集済み: Moritz Scherrmann
2021 年 2 月 4 日
Mario Malic
2021 年 2 月 4 日
App and the code looks neat! I don't think it's the number of components that are problematic anymore as I've taken your example and created 50 buttons and app was ready in a second or two.
I'd suggest you to check the part of the code that relates to loading the document and processing its sentences, use profiler like this
profile on;
NameOfApplication
profile viewer;
In the graph you'll see your startupFcn, by clicking on the bars you can get more information.
Moritz Scherrmann
2021 年 2 月 5 日
回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Environment and Settings についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
