Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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.

share|improve this question
    
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. –  Hector Nov 12 '13 at 5:52
    
Are you using something like Comodo that might be sandboxing Mathematica? –  Hector Nov 12 '13 at 5:54
    
@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 –  belisarius Nov 12 '13 at 6:32
    
I encountered the same problem on a Linux machine running Mathematica 7. And after a while Mathematica even crashed. –  asterix314 Nov 12 '13 at 7:13
1  
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. –  Mike Honeychurch Nov 12 '13 at 7:30
show 5 more comments

2 Answers

up vote 3 down vote accepted

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.

share|improve this answer
    
Thank you, it looks like a true answer. –  Alexei Boulbitch Dec 13 '13 at 9:05
add comment

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.

share|improve this answer
    
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). –  István Zachar Nov 12 '13 at 12:03
    
@István Zachar Well, but it disappears after I fix registry and fragmentation. –  Alexei Boulbitch Nov 13 '13 at 8:10
1  
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. –  István Zachar Nov 30 '13 at 11:37
    
@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 –  Alexei Boulbitch Dec 2 '13 at 8:08
1  
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. –  István Zachar Dec 13 '13 at 9:06
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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