When you load a java class into the editor, it kicks off the syntax/inspection autoparse. But if you press any key in the editor -- even read-only navigation/search/find keys -- or if you switch away from IDEA to another app, the parse is paused. When the autoparse resumes, it does NOT resume where it left off; Instead, it just starts over again.
This is a performance problem for large java file which take 10s of seconds for the syntax/inspection parse to work. IDEA should try to preserve the parse-in-progress in the cases where the same file is in the editor and no modification has been made.
I have filed some Youtracks IDEA-102742 and IDEA-102076
1. After opening a large java class in the editor, if I just move around with the file with arrow keys, search, page up/down,etc., the parse is suspended (fine, although that is another story IDEA-14683), but when I stop navigating and hover over the top-right-corner, it shows that it is not resuming the parse but instead it is restarting it from the begininning.
I tried this out with a 5000 line java file which takes about 20 seconds to syntx/inspection parse. What I did was press DOWN_ARROW, wait 5-10 seconds, press DOWN_ARROW again, wait 5-10 seconds, etc., and the parse never completed even after 5 minutes. If IDEA just suspended the parse and then resumed it, it would have finished much sooner like it 25 seconds.
I have filed IDEA-102742 for this issue.
Expected behavior: If IDEA suspends the parse, it should resume the parse in progress if it is the same file and no changes have been made, instead of restarting the parse.
2. After opening a file (same 5000 line java file), if I switch to another application, e.g. outlook or browser, wait 5-10 seconds, then switch back to IDEA and check parse progress, then switch back to other app, wait 5-10 seconds, etc, each time the syntax/inspection parse starts all over again, and IDEA never completes parsing this file unless I stop switching back and forth.
I have filed IDEA-102076 for this issue.
Expected Behavior: If IDEA suspends the parse, it should resume the parse in progress if it is the same file and no changes have been made, instead of restarting the parse.