MATLAB Answers


Why do buttons, apps, or the editor in MATLAB R2018b respond slowly or hang on MacOS?

I am using MATLAB R2019a prerelease and MATLAB R2018b with MacOS High Sierra, and I am seeing performance issues with many UI interactions such as the following:
- Really slow responses (4-5 seconds) when pressing buttons such as 'Run' and 'New'
- Lag when re-positioning the text cursor in a script file via mouse click (or highlighting sections of text)
- Lag or a freeze when interacting with some apps such as the Color Thresholder or Image Viewer apps
I did not face these issues with MATLAB R2018a
How do I solve this issue?

2 Answers

Answer by MathWorks Support Team on 15 Nov 2019 at 5:00
Edited by MathWorks Support Team on 15 Nov 2019 at 4:47
 Accepted Answer

This issue can be caused by the incompatibility of Magnet App, BetterTouchTool, or similar window-snapping apps with MATLAB R2019a prerelease or MATLAB R2018b on macOS.
This can also be due to applications like Text Expander and Phase Express.
To work around the issue, please try one of the following solutions to see if it resolves the issue:
1) Switch MATLAB to use the JetBrains version of JRE that can be downloaded from the following link:
Installing the version of JRE linked above may cause JAVA errors in MATLAB. However, these errors should not have any side effects.
2) If you are using a multi-monitor setup, moving MATLAB to a secondary monitor may prevent the issue. However, moving MATLAB back to the primary monitor may cause the issue to recur.
3) Consider switching to Spectacle. Performance regressions have not been reported on this App thus far. Find more information on the Spectacle App in the link below:
4) You should be able to use keyboard shortcuts with no delays.
5) Closing the window-snapping app and restarting MATLAB may solve this issue. This has been seen to be effective for many past instances of similar behavior.
Alternately, you might also be able to work around this incompatibility by disabling some functionality in the window-snapping app you are using or changing its settings to ignore MATLAB.
For instance, we have seen that BetterTouchTool can be left running, but the "Window Snapping" feature must be disabled for MATLAB to function properly. If quitting the app resolved the issue, you may want to try to disable the "Window Snapping" feature and restart MATLAB, if it is more convenient for your workflow.


Same problem here - this bug is not yet fixed (as of March 2019), with OS X 10.13.6, Matlab R2018b Update 3 and Magnet 2.4.2.
Disabling Magnet for Matlab is a workaround - no more, no less...
Similar issue here. When switching from the figure window to the editor, it takes several seconds before the editor becomes responsive and I can start typing (or get a cursor). Really annoying.
I use Divvy for window snapping. I turned it off and restarted MATLAB. Didn't help.
I also turned off the interactive plotting toolbar. Didn't help.
Additionally sometimes I lose the ability to type in the editor alltogether (related issue?). Has anyone else experienced this?
I'm really dissappointed in these recent releases. Going back to 2017 if this can't be resolved.
Just close Divvy completely before even starting matlab

Sign in to comment.

Answer by Seb Biass on 6 Dec 2018
Edited by Seb Biass on 6 Dec 2018

Same problem here, latest 2018 MBP, OSX 10.14, Matlab 2018b. Pretty much any interaction with GUIs - either the Matlab interface or custom GUI crashes Matlab. No window management software installed. It worked fine on OSX 10.13.
Please fix?
Update: As a matter of fact it does not crash, it is just extremely slow. On a custom built GUI it takes about a minute to change from one field to another.
Update #2: I run 2018a on my iMac with 10.14 with both BetterTouch and Magnet installed and there is no problem whatsoever. It seems that this is more likely a Matlab problem than a Magnet....


Sign in to comment.