matlab process is too slow

221 views (last 30 days)
Mahmoud Wagdy
Mahmoud Wagdy on 18 Jan 2018
Commented: Lauren Taylor on 23 Jun 2022
my laptop specs is kindly high 8GB Ram core i7 Nvidia 840m but matlab commands is slow for example i did 5+5 that took 7 minute to get the answer ps : Solidworks and some High games are working perfectly
  2 Comments
Image Analyst
Image Analyst on 18 Jan 2018
You have not asked a question, but I will. What is "5+5"? If you have code you want people to test/time, post it.
Mahmoud Wagdy
Mahmoud Wagdy on 24 Jan 2018
i mean why it's too slow

Sign in to comment.

Answers (4)

Andrew Wingard
Andrew Wingard on 7 Mar 2019
I had a similar problem on my mac, this was ultimately related to an app called Magnet I purchased through the app store. If you are running magnet, I suggest uninstalling the application and running matlab.
  7 Comments
Paul Kaufmann
Paul Kaufmann on 9 Apr 2021
Wow, I can't believe how much this impacted the responsiveness of Matlab on my M1 Mac.
Before, it was basically unusable, because any input took like 1sec to register with the app; now it's more or less instant. It still is noticably slower than any input in a "native" Mac app (it's all Java, after all), but still: disabling Magnet was a huge improvement.
Thanks for the tip!
Lauren Taylor
Lauren Taylor on 23 Jun 2022
This worked for me as well!

Sign in to comment.


Cam Salzberger
Cam Salzberger on 18 Jan 2018
Hello Mahmoud,
Does this running of 5+5 take a long time just once, then MATLAB is sufficiently fast for the rest of the session? If so, are you making sure to wait until MATLAB is done "Initializing" before you enter code or try to do anything?
If MATLAB is slow every time you enter a command to run during a session, then it could be that MATLAB is having trouble finding your license, or is otherwise slow during your license check. Try out "Solution 1" in the answer here. Despite being for an older version of MATLAB, the specification of the license file with "-c" is still applicable, though the license file itself may have changed depending on your version (.lic now, I believe).
"Solution 2b" in that article is good to check too.
Depending on your version of Windows (I'm assuming Windows here), it's also worth checking out if compatibility mode can help (as mentioned here).
If all that still isn't doing it, can you give us which MATLAB release you have installed, which OS you are using, and if this is a new problem with an old installation, or if MATLAB has always been this way on this machine?
-Cam
  1 Comment
Cam Salzberger
Cam Salzberger on 29 Jan 2018
Hey Mahmoud,
Since it's a slow initialization issue, I'll definitely recommend looking into scheduling the MATLAB Startup Accelerator if you're on a Windows machine. This will preload a lot of the material before you try to launch MATLAB, so when you actually launch it, it will start faster. The performance should be comparable to when you close MATLAB, and then start it up again soon after.
If that doesn't do the trick, I'd suggest looking to see if you have a "startup.m" file on the MATLAB path:
which -all startup
If you have a script that's running a lot of commands, or any commands that run slowly, this will slow down initialization time.
There are a few other tips here as well.
For more diagnostic information, you can start MATLAB from Command Prompt (Windows) or a terminal (Unix) with the -timing startup flag:
matlab -timing
Or the -timing+ flag on Unix systems for earlier releases of MATLAB.
This will tell you the breakdown of how the startup time is being spent. If you can't see anything yourself, contacting tech support with the timing details should help you get an answer faster.
-Cam

Sign in to comment.


Mahmoud Wagdy
Mahmoud Wagdy on 24 Jan 2018
Hello Cam, i found that matlab was Initializing but it takes long time like 15 min but after all commands works good

Andrew Wingard
Andrew Wingard on 26 Oct 2018
Does anyone know how to solve this same problem but with a MacBook? The solutions online all assume a windows machine.
  2 Comments
Rik
Rik on 26 Oct 2018
Please only use the answer field for answers. You should either post this as a comment, or as a separate question (in which case you should link to this question).
To reply to your question: I have hardly ever worked with Mac, so I would have to Google it as well.
Andrew Wingard
Andrew Wingard on 26 Oct 2018
Edited: Andrew Wingard on 26 Oct 2018
Thank you for the response, its my first time asking a question. I have added a new question but for MacBooks under the link below.
https://www.mathworks.com/matlabcentral/answers/426331-matlab-slow-initiating-any-command-including-just-clicking-on-mac

Sign in to comment.

Categories

Find more on Startup and Shutdown in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!