Community
Participate
Working Groups
Build 20031211 When editing type org.eclipse.jdt.core.tests.compiler.regression.NegativeTest, which contains 405 methods, the editor froze for a couple of minutes after a paste action. See below a dump of the offending activity:
Created attachment 7161 [details] 2 dumps of activity during editor freeze
Note that my machine is a P3 1.2GHz, 1Gb of RAM, JDK 1.4.1_05.
Created attachment 7162 [details] Offending large compilation unit being edited
I was intending to paste: , null, true, customOptions); near the end of the unit.
stack trace implies activity in JavaAutoIndentStrategy.smartIndentAfterNewLine. It gets only called after a single line delimiter has been inserted which you apparently did not do. This is strange. - Are you sure you did not press 'return' before you got the dumps? - Pasting and inserting a new line (with smart paste on) can be expensive since the current algo searches for matching parenthesis (brackets, braces) that can be far away. We probably need to cap the search distance there.
I don't think I had pressed the return key, but wouldn't bet to hard on it. The pasted code did contain line separators though. Also, none of the smart editor behavior is enabled in my settings (except for close Javadoc comments).
its definitely happening during auto-indentation. I'll try to reproduce.
Note that the org.eclipse.jdt.core.tests project is not public, and lives on snz1f. Dirk knows how to access it.
modified the smart pasting (called "pasting for correct indentation" in the prefs) code to be much faster - can you check whether this solves the problem? The stack traces point into a different direction, but since you said it was when pasting, this might still be it (see also bug 49437)
Closing as there have been fixes with smart pasting. please reopen if you still see this problem.