Azzera filtri
Azzera filtri

App designer generated app freezes in function "createComponents(app)"

26 visualizzazioni (ultimi 30 giorni)
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

Risposte (1)

arushi
arushi il 8 Ago 2024 alle 8:59
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:
  • 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.
2. Use a Timer to Delay Initialization or Use pause in Startup Function.
Hope this helps.

Prodotti


Release

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by