Bug introduced in version 13.1.0
I see an extreme slowdown when evaluating cells in Mathematica 13.1.0 if auto-completion of package symbols was previously triggered. I am using macOS 10.14.
Questions
- Does this happen with newer versions of macOS?
- Does this happen on Windows and Linux?
- Why does it happen only with some, but not all packages?
Steps to reproduce the problem
Install and load a package. I could reproduce this with my IGraph/M package, with GitLink, as well as with some private packages I use. I was not able to reproduce it with any of the standard add-ons that are bundled with Mathematica, or with MaTeX. If you experiment with GitLink, note that the version I linked to does not support Apple Silicon.
Evaluate an expression that contains symbols from the package you just loaded. Type in the package symbol manually, and make sure that you trigger auto-completion while doing so. This is a necessary prerequisite to triggering the problem. If the auto-completion box does not pop up automatically, you use Command-K (macOS) or Ctrl-K (Windows or Linux).
The evaluation will be very slow, but only when auto-completion was triggered prior to it.
Here is a screen recording showing that the problem occurs after typing the code manually using auto-completion, but does not occur when re-evaluating the same cell without re-typing it.
Notes
- This is a new problem in M13.1.0, and does not affect M13.0.1 or earlier.
- Turning off auto-completion in the Option Inspector makes the problem go away, but using Mathematica without auto-completion is a pain. If automatic auto-completion is disables, but it is triggered manually with Command-K, the problem returns. The relevant option is called
ShowCodeAssist
and should be toggled within the Global Preferences section of the Option Inspector.