필터 지우기
필터 지우기

App spends a lot of time calling ToolbarController and similar

조회 수: 1 (최근 30일)
Neurolab
Neurolab 2024년 3월 12일
댓글: Neurolab 2024년 3월 25일
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.

답변 (1개)

Karanjot
Karanjot 2024년 3월 23일
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
Neurolab
Neurolab 2024년 3월 25일
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...

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Develop Apps Using App Designer에 대해 자세히 알아보기

제품


릴리스

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by