Hello,
Today, I decided to update matlab to r2025b (I have been using r2023b since it was released).
First impressions were not good, the first thing I did is to configure the behavior of figures to be the same as in previous releases (to open everytime in the same position and with the default size). I think that opening figures with the size and position of the last figure is not very practical (maybe yes for some users, not at all for me).
Then, another disappointment with the files explorer...now I can not see on a glance if a folder is empty, I have to expand the arrow beside to check it :(, and the symbol next to the csv files is not anymore the excel logo. I know they are not really important topics but I was very used to the previous GUI and seems dificult to get used to the new one.
Anyway, progress is always good so lets give it a chance...
But finally, and the reason of this question, I start running a code that goes trough all the csv files in a folder (lets say 20 files), plots around 60 figures for each file (lots of figures in the end) and saves them, along with some .mat files. I have been using this code with r2023b for long time, it takes some time of course, but with r2025b I would say it takes like x3 or x4 times longer. Any clue if this can be solved?
I still want to give another chance to this release but...doesn't seem very promising. Good thing I didn't started migrating my Simulink models to this version :)
Best regards!

9 commentaires

Paul
Paul le 18 Déc 2025
Did you try a tool like the profiler in 2023b and 2025b to try to identify where the differences are in execution time?
Intresting point about Simulink. There have been many complaints about Matlab r2025 on this forum, but I don't recall seeing any about Simulink.
Dyuman Joshi
Dyuman Joshi le 18 Déc 2025
Modifié(e) : Dyuman Joshi le 18 Déc 2025
Just a FYI - This is not the platform to give feedback regarding MATLAB, this is a Q&A platform supported by volunteers focusing on the programming side of the queries.
If you want to give feedback to TMW regarding their products, go through here -
Contact Support > Product Support > Enhancement Suggestions.
@Paul, Simscape (which is a part of Simulink) has had a major news in R2025, i.e. the removal of SPS without any prior notice. That should count as something, right?
Guillermo Rubio
Guillermo Rubio le 18 Déc 2025
@Paul Thanks for the hint, I will do it to gather more info and see which part of the code causes the difference. Maybe I did not explain myself perfectly regarding simulink, I have not had any issue (yet), just commenting that I will wait to start using simulink 2025 until I figure out if matlab 2025 works fine for me.
@Dyuman Joshi you are right, sorry for the additional comments, I was trying to give some feedback but, you are right, this is not the place.
Dyuman Joshi
Dyuman Joshi le 18 Déc 2025
@Guillermo Rubio, the reason I mentioned it is because your feedbacks here won't lead to any upgrades/changes; though we will welcome the discussion - offering suggestions/workarounds/comments (as Paul has done) or mentioning information relevant to the topic (as Star Strider has done).
Nevertheless, the best option for you to pass on your feedbacks is to directly contact TMW as I have mentioned above.
Guillermo Rubio
Guillermo Rubio le 18 Déc 2025
Thanks again @Dyuman Joshi, I will also pass send my feedback to TMW as you mentioned above.
Kind regards,
Guillermo Rubio
Guillermo Rubio le 19 Déc 2025
Just if anyone had curiosity, I have used the profiler to measure the execution time with both versions:
r2023b:
r2025b:
Seems that savefig is one of the main causes of the time increment.
Pd: In r2025b, the profile does not generates the report properly, leaving a blank page after the table column names.
dpb
dpb le 1 Jan 2026
It appears virtually everything is 4-5X as long -- routines that were 18-22 sec are now roughly 100 sec.
I would suggest this is a prime candidate to be submitted as technical support ticket at <Product Support Page>.
Mathworks needs to see real world issues like this.
@Guillermo Rubio I have two suggestions for you to try to help isolate the cause of the performance regression:
  1. Have you experimented with not setting the figure position and leaving figures docked in the figure container? When I say "docked": the default behavior for figures in R2025a and later is to open docked into a "figure container", which allows multiple figures to occupy the same window. That "figure container" may be docked in the desktop or not. Opening figures that are docked in the figure container will be faster than opening figures that are not docked in the figure container (whether or not the figure container itself is docked in the desktop), but I'm not certain how much of the performance can be accounted for by the undocked figures vs. something else. It would be useful to test how much of a factor docked vs. undocked figures makes in your performance measurements. Note that setting the figure position will cause it to become undocked so to do this experiment you need to stop setting the figure's position.
  2. Can you start the profiler using the additional argument -detail builtin? This will provide a bit more context about what exactly is taking time within savefig.m.
profile on -detail builtin
Then, once you have stopped the profiler, run this code to save the results to a MAT-file and add the MAT-file as as attachment here. Also make sure to indicate exactly what MATLAB release you are using (the full output from version so I can get the point release as well as the major release).
p = profile('info');
save profileResults.mat p
Guillermo Rubio
Guillermo Rubio le 7 Jan 2026
Hello,
I have tried creating only one figure and then using clf to clear the existing figure and then reusing it for the next one, then saving it, and so on within the loop. This reduces the execution time with r2025b to even less the measured one with r2023a, hence I have accepted Michelle answer.
Just for informaiton, here there are the results obtained with the builtin mode on the profiler activated:
The exact version used is:
25.2.0.3055257 (R2025b) Update 2
Thanks to everyone for the help!
Kind regards,

Connectez-vous pour commenter.

 Réponse acceptée

Michelle Hirsch
Michelle Hirsch le 5 Jan 2026
Opening a figure can be slower in R2025b than in R2024b and earlier releases, and I think there can be performance and memory hits from having a very large number of figures open. If you are creating a new figure for each visualization (e.g. calling figure before generating the plot), try reusing the figure instead (e.g. call clf instead of figure). If you were making all figures first and then saving them, you'll want to move your saving code next to figure creation code.
e.g.
Instead of
for ii=1:60
...
f(ii) = figure
...
end
for ii=1:60
...
exportfig(f(ii),"myfig"+ii)
...
end
Try
for ii=1:60
...
f = figure
...
exportfig(f,"myfig"+ii)
end

Plus de réponses (1)

Sean
Sean le 5 Jan 2026
Modifié(e) : Sean le 5 Jan 2026

0 votes

Hi Guillermo, with respect to your comment about the Files panel:
"Then, another disappointment with the files explorer...now I can not see on a glance if a folder is empty, I have to expand the arrow beside to check it :("
This change was intentionally made to address users' feedback about navigating around very large directories. In prior releases, the Files panel was too slow to do such operations because, among other things, it had to make extra queries for every folder in order to determine whether to show the "expand" icon. With this change, which is also present in other modern applications, 25a and later can effectively navigate among directories with 10k+ files. That said, I understand that your desire may be different: if there is interest in a setting to control such behavior, please let me know.

Catégories

En savoir plus sur Entering Commands dans Centre d'aide et File Exchange

Produits

Version

R2025b

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by