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

120 Ansichten (letzte 30 Tage)
I am using MATLAB R2019a 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?

Akzeptierte Antwort

MathWorks Support Team
MathWorks Support Team am 5 Mär. 2024 um 0:00
Bearbeitet: MathWorks Support Team am 15 Mär. 2024 um 13:26
This issue can be caused by the incompatibility of Magnet App, BetterTouchTool, or similar window-snapping apps with MATLAB on macOS. It has been observed with R2019a, R2019b and R2020a Prerelease on High Sierra and Catalina macOS. For Magnet, asking the program to ignore MATLAB may resolve the issue.
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 OpenJDK™ 8 (Hot Spot) version of JRE that can be downloaded from the following link:
To switch the JRE that MATLAB is using:
  1. (Recommended) Rename <matlabroot>/sys/java/jre/maci64/jre to <matlabroot>/sys/java/jre/maci64/jre_bak.
  2. Copy the content of <jre_root>/Contents/Home to <matlabroot>/sys/java/jre/maci64/.
  3. Confirm the operation by finding “java” executable in the path <matlabroot>/sys/java/jre/maci64/jre/bin/java.
  4. Launch MATLAB and verify the JRE version with “version -java”.  The output should include “AdoptOpenJDK”.
2) 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.
3) 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.
4) Consider switching to Spectacle, an open source MacOS application. Performance regressions have not been reported on this App thus far. 
5) You should be able to use keyboard shortcuts with no delays.
6) 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.

Weitere Antworten (1)

Steve Myers
Steve Myers am 11 Okt. 2020
Bearbeitet: Steve Myers am 11 Okt. 2020
All I did was tell Magnet to "Ignore MATLAB" and it resolved the issue for me.
EDIT: Still laggy when you switch windows to another app then come back to MATLAB like that, quitting Magnet will fix that if it's bothersome.

Kategorien

Mehr zu Migrate GUIDE Apps finden Sie in Help Center und File Exchange

Produkte


Version

Noch keine Version eingegeben.

Community Treasure Hunt

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

Start Hunting!

Translated by