We use ANTLR and it generates a lot of large Java files (37Mb in 67 files). IDEA often freezes for a few minutes (up to 30 min in the worst case) while processing these files. The only resort is to kill the process and clean up cache directory. If I turn on "Power Saving Mode" it mostly helps, so not always. I found in this forum document about IDEA dumping stack dumps while freezing to be analyzed later. But it seems for me that the cure is worse then the decease. I got an impression that for a few minutes all IDEA was doing is just print the stacks every few seconds. To illustrate I attached a list of stack dumps.
Any suggestion how to resolve the problem with freezing would be appreciated. For example, It is possible
a) disable code inspections for the specified directory. I can do it on file by file basis but only if the file is already opened in the IDEA and it may freeze IDEA at the moment the file is loaded into IDEA.
b) turn off stack dump feature or at least increase the time interval?