I don't know what a m/c is, but I assume it's some sort of toy computer. Have a look at
this document when you have a chance.
IDEA doesn't do very well when you ask it to do certain tasks on very large files; reformatting them, for example, or even simply parsing and hilighting them if memory is tight and the file is very large. You can edit the batch file that starts IDEA to give IDEA more memory, and that might help, but the best suggestion is just to make your classes smaller. Classes that are big enough to choke IDEA are really crying out to be refactored.