When I start Mathematica, the first evaluation always takes forever even it's as simple as x = 2, and when I halt the evaluation with Alt + . and restart it again, it runs as expected but the variable that's been assigned a value won't be marked as black. Besides, my user-defined functions on $UserBaseDirectory\kernel\init.m are highlighted but not interpreted correctly.

I have both Mathematica 9.0 and 10.4 on my Win 7 PC and the problem happens on the front end of both versions but not the kernels, so I think it has to do with some front end initialization module shared among all versions. But I'm not familiar with the infrastructre of Mathematica, so what should I check?

  • 1
    $\begingroup$ Are you sure the delay is not just due to the kernel starting up? Depending on your settings, a kernel may not be started automatically when you open the front end, so your first calculation takes longer because it's spooling up a kernel. Try this: go to "Evaluation" -> "Kernel Configuration Options" -> select the Local kernel and click "edit" -> check "Automatically launch on front end startup", then close the front end, and try the same process again. Is the first calculation faster? $\endgroup$ – MarcoB Jul 1 '16 at 23:01
  • $\begingroup$ @MarcoB I don't think it is. I waited for ~1 min and the result did not show up, plus that "Automatically launch on front end startup" is already checked. $\endgroup$ – arax Jul 2 '16 at 7:24

Your Answer

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

Browse other questions tagged or ask your own question.