14
$\begingroup$

Under Windows 7 I frequently get serious keyboard lag. My home machine (Windows XP) NEVER lags. I was able to improve things somewhat by running Mathematica as Administrator, but this only went so far. The machine is very powerful, has tons of memory.

The symptom is that any keypress or mouse click takes a second or two before anything happens. It is EXTREMELY annoying. You click the left arrow key, wait, click arrow key again, wait, click arrow key again, wait,... eventually you get to the place you need to be. If you hold the arrow key down, the system hangs then 5 seconds later the cursor appears 4 words over.

Other applications running on the same computer at the same time show no effect. Word, Excel, even total memory hogs like Adobe Illustrator run and respond immediately to keystrokes. Only Mathematica is displaying this lag.

I guess I can use a assembly language debugger to find out where the loop is that is lagging it out, but I am hoping somebody can save me the agony of doing this.

$\endgroup$
10
  • $\begingroup$ I know there is a combination of keys that you can press while launching Mathematica so that its installation resets to factory defaults. I think it is Ctrl+Shift. Do it using a limited account and if it works it will ask you for administrator credentials. $\endgroup$
    – Hector
    Nov 12, 2013 at 5:52
  • $\begingroup$ Are you using something like Comodo that might be sandboxing Mathematica? $\endgroup$
    – Hector
    Nov 12, 2013 at 5:54
  • $\begingroup$ @Hector To perform a clean start on Windows, start Mathematica while holding down the Ctrl and Shift keys. Keep the keys held down until one of Mathematica‘s screens appears. If this does not seem to work, you can perform a clean start manually by deleting the Base Directory and User Base Directory on the computer. from support.wolfram.com/kb/3274 $\endgroup$ Nov 12, 2013 at 6:32
  • 1
    $\begingroup$ I encountered the same problem on a Linux machine running Mathematica 7. And after a while Mathematica even crashed. $\endgroup$
    – asterix314
    Nov 12, 2013 at 7:13
  • 1
    $\begingroup$ Try switching off syntax colouring and see if that helps -- with larger notebooks it can really slow things down. You can do this in the preferences menu, appearance tab. $\endgroup$ Nov 12, 2013 at 7:30

2 Answers 2

5
$\begingroup$

I think I have figured this out. I turned off a number of Windows 7 "features" and typing became responsive. Here are the things I turned off:

Go to: Control Panel \ All Control Panel Items \ Programs and Features

Click Turn on/off Windows Features on left nav panel.

Turn off:

  • Indexing Service
  • Remote Differential Compression
  • Windows Search

After doing this Mathematica is behaving normally. The basic problem seems to be that Mathematica is writing some file (or by side effect causing a file to be written) every time a character is typed, and the above "features" greatly slow down file access.

$\endgroup$
0
-1
$\begingroup$

I have it also with Win 7 and not with Win XP (I have them on two computers on which I run Mma). I do not really know, what's this, but I have an impression that it is Windows problem, rather than the Mathematic one. The workaround that I have found is to regularly fix the computer with a program like Reg Organizer that straightens the registries and makes the disk defragmentation. It helps, if only for a short period of time like few days, up to 1 week. That is, I only occasionally use the computer with Win7. I hope it helps. Anyway, if you see a regular way out of it, please let me know.

$\endgroup$
6
  • $\begingroup$ Honestly, I don't think the Windows registry has to do anything with this issue. I have encountered the same lag with the same large file under all systems (Linux, OSX, Win). $\endgroup$ Nov 12, 2013 at 12:03
  • $\begingroup$ @István Zachar Well, but it disappears after I fix registry and fragmentation. $\endgroup$ Nov 13, 2013 at 8:10
  • 1
    $\begingroup$ Alexei, that's fine that it disappears for you, but I highly doubt that the OP could reproduce this. I always found such registry cleaners useless, and - as a more direct counterargument - I could reproduce the lag with a clean OS+Mathematica install if a large-enough cell/notebook is used with syntax colouring. BTW, the downvote is not mine. $\endgroup$ Nov 30, 2013 at 11:37
  • $\begingroup$ @István Zachar, OK, I've got it. Please be so kind to let me know, if you will eventually find some explanation or workaround $\endgroup$ Dec 2, 2013 at 8:08
  • 1
    $\begingroup$ I am still skeptical. Defragmantation might help, but I am not familiar with its details. But I am skeptical mostly because of the statement "Mathematica is writing some file (or by side effect causing a file to be written) every time a character is typed". What is this file? Why would Mathematica do such thing? The notebook that one works in is only written to file if explicitly saved. And we know that there is no real undo, so why would Mathematica store every keystroke? Until OP gives more detail, I remain neutral. $\endgroup$ Dec 13, 2013 at 9:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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