0

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.

0

The problem might be related to Matlab R2014a. I have a similar problem in Windows 7 64bit with an efficient laptop. When running some simple script over and over again doing modifications to parameters, Matlab freezes on every 2nd or 3rd "run". Same thing with typing in the command window. It seems like the program would fall asleep every another minute or something.

  • we are in Ubuntu not windows OS!! – αғsнιη Sep 23 '14 at 5:19
  • We are in Matlab. – Antti Sep 23 '14 at 5:56
0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.