Community
Participate
Working Groups
Created attachment 287944 [details] Screenshot sampling.png reproduce: 1. create a file "test.txt" 2. insert 1000 lines: "hello world"\n 3. Find "world" & "Select All" => already "Select all" is slow .. playing an animation of selecting one after the other, but ok... 4. exit the search dialog 5. type "eclipse" (to replace the "world" with "eclipse"). => freeze for some minutes! even "Replace all" is faster And when i meanwhile switch the application not even all characters have been replaced.
Created attachment 287945 [details] Screenshot invocation Count for 100 lines.png To get an idea of the problem i did recorded the invocation count during replacing only n=100 lines. One can see that AbstractDocument.replace is called n times and then n Events are created and then O(n^2) OS calls happen. kinda strange to see that getLineCount() is that expensive and called so often.