Matlab has become unusually unresponsive when I allow it to sit for some time (a few hours to a few days). The type of slowness I'm referring to is simply that the command window, variable editor and code editor are almost non-responsive. A click to activate one of the windows will take 10-30 seconds to respond, rendering the application useless.
I have just over 1GB worth of variables loaded into my workspace but this pales in comparison to the power of my machine (48Gb of RAM and 24 processors). I also have the java heap space turned up to 2.5 GB but still consistently receive a laggy Matlab, even when no variables are open in the editor and no plots have been drawn.
Just to note - as I click the X to close Matlab, even though I have not even opened a code window and Matlab has been sitting idle for 2+ hours - I get the message "An operation is in progress. If the operation does not finish in 20 seconds, Matlab will stop the operation and exit."
ver details - Matlab 2014B 64 bit (v 8.4) Windows 7 Professional V6.1 SP1 Java Version: Java 1.7.0_11-b21 with Oracle Corp Java Hotspot - 64-Bit Server VM mixed mode.
Thanks in advance for your help, Brian

댓글 수: 3

Brian
Brian 2015년 1월 7일
I'm guessing that by the lack of response that I may one of the lucky few to have experienced this issue...
Sean de Wolski
Sean de Wolski 2015년 1월 7일
I'd guess that the lack of response was that many people had Thursday-Sunday off for New Years so this disappeared off the front page by Monday morning.
Marcos Guimaraes
Marcos Guimaraes 2017년 7월 27일
I have exactly the same problem. Even to change directory takes seconds

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

 채택된 답변

Sean de Wolski
Sean de Wolski 2015년 1월 7일

7 개 추천

Is your current directory either:
  1. Full of thousands of files?
  2. On a network?
These two reasons are often the cause of lag because MATLAB needs to refresh the path every time it displays the command window.

댓글 수: 7

Brian
Brian 2015년 1월 7일
Thousands of files - no. But yes it is on a network. The current path that I'm working in has 45 files, many of them .M and .MAT files. In all, the folder contains just over 6GB worth of files (most of the space is taken up by the large .MAT files). There are also a few Excel files in the folder. Could this type of environment potentially lead to the issue I'm referring to? Is it suggested as better practice to always work off C:? Is it best not to store large .MAT files in the current working folder?
Thanks Sean, Brian
Sean de Wolski
Sean de Wolski 2015년 1월 7일
Size of MAT files shouldn't (I don't think!) matter, it's the quantity that it needs to know about. However, the network drive absolutely does matter.
Give working off of C: a chance to at least let you know if the network is the issue.
Personally, I have a network drive that I back everything up to but work out of C:.
Brian
Brian 2015년 1월 7일
Thanks Sean, although it's a mystery to me why this would impact Matlab's performance - the changing of my active directory to C:/temp immediately resolved the lag issue. I'll reach out to Mathworks and see if they have anything to say about the reasoning for this occurrence.
Thanks again, Brian
Sean de Wolski
Sean de Wolski 2015년 1월 7일
It's expected. Every time MATLAB shows the command window, it implicitly does a rehash, i.e. it looks at everything on the path including the current directory for new m/p/mex files to run. If it has to communicate over the network to do this, the hardware and network speeds will limit it.
aacarey
aacarey 2015년 11월 13일
I was having the same issue. MATLAB starts out quickly, but after some time (a couple of hours or so) it becomes very slow. And I don't mean execution of commands and stuff, but just tabbing through things, typing text, etc. Sometimes it's so bad it can't even open a figure and I get the error UIJ_AreThereWindowShowsPending - timeout waiting for window to show. I'm using R2014a, and I've never had this issue on another computer I have that is running an older version and using the exact same data.
ANYWAY: thanks for pointing out the issue! Switching to C: and back fixes the lagginess for me as well.
Eduardo Gil
Eduardo Gil 2018년 11월 25일
이동: Adam Danz 2023년 2월 25일
Thanks Sean, you deserve a medal. I am running a 1,000 lines matlab code using Spreadsheet link to exchange data between Excel and Matlab - and all of a sudden the exchange of data between Excel and Matlab starts to run unusually slow. The code runs in 60 seconds. I move the spreadsheet and the matlab code to C: drive - now it runs in 2.5 seconds. It's the freaking network.
Adam Danz
Adam Danz 2023년 2월 25일
I wrote a utility several years ago to see what's on your CD history and a GUI to remove unwanted CD history.

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

추가 답변 (4개)

Jon
Jon 2017년 9월 25일
편집: Jon 2017년 9월 25일

1 개 추천

I've been having a similar issue with my 2011b installation where it suddenly became very slow to switch between the Editor and the Command Window, and slow to execute any command from the Command Window. GUIs and figures still responded normally. I tried the solution mentioned above with no effect. My issue ended up being the 'Command History' which I never remember clearing before. Once it was cleared the Command Window started responding immediately again.
Rtf
Rtf 2022년 4월 7일

1 개 추천

Hi I am having the same problem here and I can not use a local drive because I have to work on a network drive. This is so disapointing and frustrating... Sometimes I need to wait 30 seconds or more for the editor or the comand line to repond again and this is almost happening all the time!! Please is there any solution to that?

댓글 수: 2

Ward Newman
Ward Newman 2023년 2월 25일
Yes, I find this unacceptable as well. Any enterprise user in the semiconductor or similar industry will be using shared cloud drives etc. The staff answer above from Sean is an explanation but not a solution. I've been an avid MATLAB user both as a student and now a professional for over 15 years but I'm getting ready to turn my back on the program. Mathworks is going to be losing business from this as I will advise my collaegues to drop off as well. The killed productivity from this "slow down" is measurable.
Jeremy Rutman
Jeremy Rutman 2024년 3월 26일
There's nothing I've seen in matlab proper that python/numpy/matplotlib cannot do - tho as far as I can tell simulink is somewhat useful and doesn't yet have any competitor .

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

Jeremy Rutman
Jeremy Rutman 2024년 3월 26일
편집: Jeremy Rutman 2024년 3월 26일

1 개 추천

Same issue with a new trial verson of matlab 2024a with only a super-simple simulink example open, no cloud files and no network install. On trying to add a code block, the block is almost entirely useless its so laggy. Neither restart nor reinstall of matlab don't help. My machine is a 24-core i9 with 64Gb ram, is this insufficient for a simulink code block?
David Jessen
David Jessen 2021년 10월 2일
편집: David Jessen 2021년 10월 2일

0 개 추천

I just got MATLAB and I have not done anything, but when I type it laggs, navigating between windows works perfectly

댓글 수: 1

Niranjan Nanjappa
Niranjan Nanjappa 2022년 2월 1일
편집: Niranjan Nanjappa 2022년 2월 1일
I have the exact same issue. Its a new installation of Matlab R2021b and everything works fine apart from the text editor that keeps lagging.

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

카테고리

도움말 센터File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

제품

질문:

2015년 1월 2일

편집:

2024년 3월 26일

Community Treasure Hunt

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

Start Hunting!

Translated by