Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 335755

Summary: Search/replace preview takes too long
Product: [WebTools] WTP Source Editing Reporter: jzaruba <jaroslav.zaruba>
Component: jst.jspAssignee: jst.jsp <jst.jsp-inbox>
Status: CLOSED DUPLICATE QA Contact: Nick Sandonato <nsand.dev>
Severity: normal    
Priority: P3 CC: daniel_megert, thatnitind
Version: 3.2.2   
Target Milestone: ---   
Hardware: PC   
OS: Windows Vista   
Whiteboard:
Attachments:
Description Flags
a thread dump
none
a thread dump of the actual replacement process none

Description jzaruba CLA 2011-01-29 04:19:21 EST
Build Identifier: 

Generating the preview of search/replace changes takes way longer than the search itself. (For 26 matches w/o regexp it takes literally several minutes.) Judging by task manager CPU load is rather low. (Also the process is uninterruptible, i.e. the red button does not work.)

A thread dump is attached.

Reproducible: Sometimes

Steps to Reproduce:
1. open large project (+5k files, might help if the project has several other projects related)
2. use File search, set your search query, click Replace
3. when you get your search result, click Preview
Comment 1 jzaruba CLA 2011-01-29 04:19:50 EST
Created attachment 187900 [details]
a thread dump
Comment 2 jzaruba CLA 2011-01-29 04:22:36 EST
Also during the actual replace (after I reviewed the changes in Preview) Eclipse seems to be sleeping... I'm adding a thread dump also for that.
Comment 3 jzaruba CLA 2011-01-29 04:23:04 EST
Created attachment 187901 [details]
a thread dump of the actual replacement process
Comment 4 jzaruba CLA 2011-01-29 04:26:32 EST
I do apologize for not including the build ID: 20100917-0705

Also note that the process eventually finishes, but currently I'm waiting +5min for 26 replacements to get done.
Comment 5 Dani Megert CLA 2011-01-31 02:51:05 EST
Which build ID?

Looks like creating a JSP document is very expensive.
Comment 6 jzaruba CLA 2011-01-31 07:09:32 EST
The build ID is 20100917-0705.

I've just replaced 2 occurrences in 2 JSP files and it took 3 minutes from the moment I pressed 'OK' (after obtaining search results)... w/o Preview.
Comment 7 Nitin Dahyabhai CLA 2011-01-31 09:04:19 EST
Probably a duplicate of bug 326332.
Comment 8 Nick Sandonato CLA 2011-01-31 17:04:09 EST
Thanks for your report. This does appear to be a duplicate of Bug 321602 / Bug 326332. If you follow the instructions in Bug 321602 comment 10, you'll be able to install the feature patch on top of Helios SR1. This issue has been fixed for SR2.

*** This bug has been marked as a duplicate of bug 321602 ***