フィルターのクリア

function with multiple listeners freezing on R2024a. was working fine on R2022b

61 ビュー (過去 30 日間)
Bastien Haemmerli
Bastien Haemmerli 2024 年 7 月 3 日 8:26
コメント済み: Bastien Haemmerli 2024 年 7 月 3 日 8:34
Hi,
I have created a function (with multiple embedded functions in the same .m file) that create a GUI to load a picture and add a "user defined" amount of line on it that the user can modify.
I don't think i can share the full code but on the principle:
  • once the user has selected the figure, it gets put in an ax
  • the added curves are then saved as "children of the ax"
  • there are sliders button with listeners that are linked to those lines, through the list of children of the ax.
  • when the user select a curve in a drop-down list and move the associate slider, the selected line move on the graph.
the listeners are added in a loop as the code doesn't know a priori how many lines the user would add.
I was quite proud of this code that was working exactly as intended on R2022b, when I coded it. I skipped entirely R2023 but I now installed R2024a and the code freezes when creating the first series of listeners. it does not issue any error mistake but I just hear my PC working very hard suddenly, with matlab using suddenly up to 20% of the CPU. I saw this thread
regarding potentially the same issue but it was for R2015.
I tried as well to install R2023b and the code freezes as well. for comparison I use the exact same code with the same figure and the same amount of added line (20) on all three versions. this is what I get
R2022b: lines and listeners added in 6 sec. CPU usage max up to 25%
R2023b: lines and listeners added in >120 sec (I killed the process). CPU usage max up to 16 % at the start, but steady at 12% until I kill the process.
R2024a: lines and listeners added in >120 sec (I killed the process). CPU usage max up to 25 % at the start, but steady at 15% until I kill the process.
I tried as well with lower amount of line (5) and all three version worked. it was very fast for R2022b (<1sec) and took about 5 sec. for R2023b and R2024a.
My code is certainly not optimal. I was learning how to make a GUI while doing it and after the fact I saw how I could have make it better, but since it was working I did not bother...and of course now I don't really "remember" all that I did back in 2022.
without seeing the code, would you be able to tell me what changed between R2022b and R2023b/R2024a that would make my code that much slowlier? would you have a quick fix?
  1 件のコメント
Bastien Haemmerli
Bastien Haemmerli 2024 年 7 月 3 日 8:34
Maybe it has its importance: I'm doing this for work on a work PC without admin rights. since last year, there has been some issue with the installation process of Matlab on our work computers. the auto-extractor (with winzip) fail to execute so we need to launch the installation manually. as well the "post installation processes" fail to be performed (potentially due to antivirus or lack of admin right).
this issue was not there when I installed R2022b on my PC, but did happen now when I installed R2024a and then R2023b for the trial.
potentially then the issue is linked to a failure during installation (maybe one of the step done in the "post installation processes" of the installer that is not performed on my PC for R2023b/R2024a is "helping" in running the code on R2022b?)
I'm not at all an IT expert and does not get a lot of support from our IT supplier. so I just thought about mentioning it in case it make sense for some of the MATLAB/IT "guru" in the community :)

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeIntroduction to Installation and Licensing についてさらに検索

製品


リリース

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by