intellij-haskforce
intellij-haskforce copied to clipboard
Endless recursion when parsing large files
It seems the parser can't handle some large files (~1k lines), particularly due to the way the parser backtracks. This causes seemingly endless recursion and locks up the IDE eventually. I haven't been able to track down which parser rules are most to blame, but kicking down the max recursion level configuration from 1000 to 100 seems to really help (this of course changes how some things parse and converts red-cut pinning in the parser to error nodes which may then choose alternate paths in the parser).
I have a hack that seems to help with this and plan to include it in the next release. As I've mentioned several times, a parser rewrite is really in order, but this is, of course, a tall order. But until then, we need something that works for large files, and kicking down the recursion level seems to work quite well.
I think this is what's causing my ide to grind to a halt. I have a ~35k chars long file in which it takes ~5 seconds to duplicate a line.