- Lazy Loading: Instead of creating all components at startup, create them only when they are needed. This can significantly reduce the initial load time.
- Component Grouping: Group related components together and initialize them in batches. This can help in managing the load more efficiently.
App designer generated app freezes in function "createComponents(app)"
11 ビュー (過去 30 日間)
古いコメントを表示
Hi
I've written an application using App Designer with 100s of components. When I start the app it freezes during the build of the components in the App Designer generated function createComponents. This happens before my own code starts to execute. The way to avoid this freeze is to add a breakpont far down in the createComponents function. createComponents is called before registerApp and runStartupFcn is called. All the mentioned functions are generated before my own code start to execute and are generated by App Designer and are therefore grayed out which means I can't do any edits.
Is this freeze problem known to this community and is there a fix for this?
Is there any way for me to edit the App Designer generated functions? I would like to add a pause instead of a breakpoint as a possible way to solve the freeze in createComponents function...
I'm running Matlab R2022a Update 8.
Most grateful for your hints and tips
0 件のコメント
回答 (1 件)
arushi
2024 年 8 月 8 日
Hi Magnus,
It seems like you're encountering a performance issue due to the large number of components in your App Designer application. This can indeed cause the app to freeze during the initialization phase. While you cannot directly edit the App Designer generated functions (createComponents, registerApp, runStartupFcn), there are a few strategies you can employ to mitigate this issue.Strategies to Address the Freeze Issue:
1. Optimize Component Creation:
2. Use a Timer to Delay Initialization or Use pause in Startup Function.
Hope this helps.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Develop Apps Using App Designer についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!