Effacer les filtres
Effacer les filtres

App spends a lot of time calling ToolbarController and similar

1 vue (au cours des 30 derniers jours)
Neurolab
Neurolab le 12 Mar 2024
Commenté : Neurolab le 25 Mar 2024
I am building a small app using Matlab's App Designer. This app displays plots, listboxes and other interactive elements.
To solve a small slowdown issue I recently used Matlab's profiler, I was able to solve my issue but in the process I also noticed that during operations, that I expect the user to do often, the app spends a lot of time (>50%) calling subfunctions that seem to be related to axis toolbars, such as ToolbarController, WebToolbarController, AxesToolbar etc:
Here, the blue bars on the left represent code I understand and expect, the pile of grey bars on the right are unexpected.
I am wondering why this is happening? I am also suprised by this because I have disabled toolbars for my app axes (in App designer, under interactivity > toolbar.visible is unchecked) so the app should not really need to spend time dealing with toolbars at all.

Réponses (1)

Karanjot
Karanjot le 23 Mar 2024
Hi,
It's interesting that you're experiencing unexpected performance issues related to the axis toolbars in your MATLAB App Designer. Even though you have disabled the toolbars in the App Designer, there might still be underlying processes related to the toolbars that are affecting the performance adversely.
To investigate further, I suggest you to check if there are any callbacks or functions in your code that are indirectly interacting with the toolbars. Sometimes, even if the toolbar is disabled, certain operations or functions can still trigger toolbar-related processes.
Additionally, Review your code and make sure that you are not inadvertently calling any functions or performing operations that are related to the toolbars. Look for any unintentional interactions with the toolbar-related classes you mentioned (e.g., ToolbarController, WebToolbarController, AxesToolbar).
Since App Designer is built on top of MATLAB's graphics system, so there might be underlying processes related to the toolbars that are still being executed, even if they are not visible in your app.
  1 commentaire
Neurolab
Neurolab le 25 Mar 2024
I agree, but how do I know if an operation calls functions related to the toolbars?
If you look at the output of the profiler, there is no parent function listed for the toolbar functions, I don't know why they are being called...

Connectez-vous pour commenter.

Catégories

En savoir plus sur Develop Apps Using App Designer dans Help Center et File Exchange

Produits


Version

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by