Sunday, April 28, 2024
 Popular · Latest · Hot · Upcoming
0
rated 0 times [  0] [ 0]  / answers: 1 / hits: 701  / 2 Years ago, sat, september 10, 2022, 9:48:30

My Matlab 2014a interface really started lagging recently, after months of smooth and fast performance, on Ubuntu 14.04. Both the main Matlab window and the code editor window has a persistent response lag with both typing and selecting window components. If I type, then every few seconds the interface freezes and the text I typed during the freeze displays after the second-long freeze is over.



I'm running a dedicated i7 3770K with 32GB Ram, with 25GB free SSD system disk space, and I've never experienced this lag before. Other programs, like Chrome, Geany, Blender, SMPlayer, Firefox are all running smoothly as always.



I tried to see if another program is hogging Java, but could find none, and the CPU usage is even 0-5% when the Matlab lag persists. When Matlab has freshly started, it does not have the lag, but after normal usage, hours later it suddenly starts lagging. Code execution seems to happen at normal speed, it's just the interface that lags.



If I run a second Matlab session concurrently with the first and load the same workspace and files into the code editor, then the second Matlab performs smoothly without lag at least for a couple of hours.


More From » java

 Answers
2

The peculiar Matlab interface lag was probably caused by a high quantity .mat loading script I ran previously. Even when I restarted Matlab without running anything in the new session, the interface would start to lag after a while, but only when the pc was not restarted since running the .mat loading script in a previous Matlab session.



The fact that the problem persisted even if Matlab was restarted, made it more difficult for me to see that a previous Matlab process could be the cause of the problem, since I assumed that completely shutting down all Matlab processes would also eliminate associated effects from particular scripts that were run.



This assumption does not seem to hold, and it seems that loading 1000s of .mat files causes some sort of inefficiency in Matlab to rear its head. I know it is not the size of the resulting variables in the workspace, as I have routinely loaded singular .mat files and scripts producing variables with a total size exceeding 20GB, without ever experiencing such lag. It must then be 1000s of file accesses that causes the problem in Matlab.



If I used another Matlab 2013b install to load the 1000s of .mat files into a single data structure, then I do experience the same peculiar lag in Matlab 2014a. However, if I restart Matlab 2014a, without ever running the 1000s .mat load in 2014a but just in 2013b, then the Matlab 2014a interface does not lag afterward.



So, I would almost call this a type of bug in Matlab 2013/2014 that is at least related to loading 1000s of .mat files. My temporary solution is to use Matlab 2013b to load the files and concatenate them into a singular .mat, and restarting Matlab 2014a if it was open.


[#23133] Saturday, September 10, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
overine

Total Points: 20
Total Questions: 109
Total Answers: 98

Location: Aruba
Member since Fri, Jun 24, 2022
2 Years ago
overine questions
Tue, Jul 12, 22, 00:27, 2 Years ago
Wed, Jan 11, 23, 02:15, 1 Year ago
Tue, Aug 10, 21, 01:39, 3 Years ago
;