Bug 18232 - Performance: Replace All very slow
Summary: Performance: Replace All very slow
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P2 major (vote)
Target Milestone: 2.0 F3   Edit
Assignee: Kai-Uwe Maetzel CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2002-05-29 15:44 EDT by Andrew Cornwall CLA
Modified: 2002-06-12 22:50 EDT (History)
0 users

See Also:


Attachments
Big Java file (22.67 KB, text/plain)
2002-05-29 15:44 EDT, Andrew Cornwall CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Cornwall CLA 2002-05-29 15:44:20 EDT
I used "Replace All" on the attached file. It was very slow (relative to 
something like Word). You can actually watch the scrollbar thumb go down through 
the file.
Comment 1 Andrew Cornwall CLA 2002-05-29 15:44:40 EDT
Created attachment 1106 [details]
Big Java file
Comment 2 Nick Edgar CLA 2002-05-29 15:53:16 EDT
Which build?
Comment 3 Nick Edgar CLA 2002-05-29 15:53:44 EDT
Please try on 20020529.  There have been performance improvements in text.
Comment 4 Andrew Cornwall CLA 2002-05-29 16:47:04 EDT
Tested in 20020529 Integration build.

  - it's acceptably fast if what you're replacing has no errors (7 seconds for 
700 replaces)
  - it's still slow if what you're replacing has errors (14 seconds for 700 
replaces - use a class called "Junk" instead of "Date" in the example to see 
what I mean).

It looks as if syntax colouring / error warnings aren't turned off when you 
press "Replace All".
Comment 5 Andrew Cornwall CLA 2002-05-29 16:59:47 EDT
As a meaningless basis for comparison, Word (with grammar checking enabled) 
takes less than a second to make all the replacements.
Comment 6 Nick Edgar CLA 2002-05-29 21:15:22 EDT
Kai, might want to look at this as part of the performance work.
There might be other cases that are affected by there being many errors, e.g. 
format.
Comment 7 Kai-Uwe Maetzel CLA 2002-06-03 12:38:31 EDT
Build F2 exhibits a much better performance.
Comment 8 Nick Edgar CLA 2002-06-05 23:10:09 EDT
In F2, I tried the following:
- new file Large.txt
- add line: This is a large file.
- duplicate the text 13 times to create 8192 lines (select all, copy, paste, 
paste)
- save and close
- rename to Large.java file
- add at the beginning:
public class Large {
    public static void main(String[] args) {

(did not add closing braces)

- Replace 'This is a large file.' with '        System.out.println("This is a 
large file.");'
- It took about 15 minutes to come back.  Meanwhile the UI was blocked.

I was trying to create a large file to test showing a busy cursor when opening 
a file.  The file before the replace was only 184K.

Please consider for F3.
Comment 9 Nick Edgar CLA 2002-06-05 23:36:18 EDT
Tried saving the file after the replace came back.
Had to kill it after 25 minutes.
Comment 10 Kai-Uwe Maetzel CLA 2002-06-11 04:29:29 EDT
Reviewed by Erich.
Comment 11 Nick Edgar CLA 2002-06-12 22:50:50 EDT
In F3, Replace All for this case is acceptably fast.
However, Save still takes forever.  I killed it after 10 minutes.
Filed bug 20112 for this.