Matlab r2020a becomes extremely laggy after several hours

1 次查看(过去 30 天)
Hello All,
Within the past month I have come across an issue where matlab becomes extremely laggy (i.e. taking >30 sec to switch between command window and editor, push buttons, typing in the command window, basically everything else too). I have a code that I wrote back in 2019 and have been working with it weekly since then no problem, but within the last month this issue has started to occur. I have found several ways of fixing the issue but non of them work 100% of the time:
1. A simple 'clear all' in the command line works sometimes
2. Closing and rebooting matlab will occationally work
3. Some times i have to restart my entire laptop
4. if all else fails, I perform all prior steps again and leave it for several hourse; eventually it resolves itself.
The code I am working with is approx. 1000 lines long and should have plenty of memory space/ cpu power. I am running matlab on my 2019 macbook pro (i9 2.3 ghz 8-core, 32 gb of ram). I have been working with it for 2 years now and memory requirments can be as low as several mb to several gb; prior to a month ago I had no problems regardless of size. I have even set the working directory to a folder containing only this script, but this does not solve my issue. Does anyone have suggestions on how to diagnos and resolve the problem?
Thanks ahead of time!
Sincerely,
Brennen
  3 个评论
john carr
john carr 2021-7-27
Hey guys, thanks for the quick responses!
@Adam Danz I am not using any remote drives.
@Yongjian Feng I will double check the usage next time the issue occurs. I just tried to force the issue by test a large case of my code and the memory usage didn't exceed 2gb and I still had 20gb free.

请先登录,再进行评论。

采纳的回答

Walter Roberson
Walter Roberson 2021-7-27
If you are using any window management program such as Magnet, then disable that or configure MATLAB to be excluded.
If you have programs marked as accepted in the Accessibility area of Security preferences then experiment with deauthorizing them, as some of Accessibility actions do not get along well with MATLAB.
For example I have some mouse and camera and game controllers enabled in Accessibility, and I have not had any problems with those myself but similar items are affecting other people (but window management is a much more common cause)
  7 个评论
Walter Roberson
Walter Roberson 2021-7-28
I cannot recommend the Logitech MX Ergo
The thumb trackball works, but thumbs do not give much precision, so the trackball is okay for gross movements across the screen, but not for pointing to particular locations.
(Or at least my thumb does not give much precision.)
The Kensington Wireless Trackball is much better for constant use (but could be better for middle-scroll, so needs improvement for games that rely on middle scroll, such as for throwing and retrieving ropes.)
john carr
john carr 2021-7-28
Ah good to know, I ended up going with the logitech lightspeed gaming mouse. Hopefully this one wont interact with matlab, seems that your experience is a positive sign for logitech mice though.
Thanks again!

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Startup and Shutdown 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by