I have noticed in the past that Find & Replace is not particularly quick with larger files when lots of replaces take place, but have just come across a very good example of just how slow it can be.
I have a 1.8MB xml file with 6175 lines from one system that I have to import into another system, but I have to make a change to each line in order for the import to work.
Each line/node starts:
Code: Select all
<report district="CBC" cat="FHY" from="
Code: Select all
<item district="CBC" cat="FHY" from="
Loaded the XML file into WeBuilder 9.1.0.98, Search -> Replace. Put <report into "Search for" and <item into "Repalce with"
None of the "Options" are ticked, Direction is forward, Scope current document, and Origin is From Cursor as I'm at the top of the document.
Clicked Replace All and waited...
I originally thought WeBuilder had hung so I ended the task and tried again, the same.
So again I thought I'd wait, see what happens, and eventually it started to do the Find & Replace.
I did some timings, after clicking "Replace All" it took 1m:12s before WeBuilder started to do anything at all, it then took a further 2m:09s to do the replacing, totalling 3m:21s to do 6172 replaces.
I'm not sure what is going on to start with when "nothing" is happening, but when the Find & Replace is happening it is scrolling through the file at each match, in this case every line, so I would guess that slows it down considerably.
I tried again, this time renaming to a .txt file so there was no code highlighting, and turned off things like "Highlight focused line" but it made no difference to the speed.
I know this is a rather extreme Find & Replace to do but my other editor, which I used before I found WeBuilder, can do the same in under half a second!
I've uploaded a zipped copy of the file to http://swindonmike.googlepages.com/slowfind%26replace so anyone willing to can try it for themselves!
It's not every day that I do such large Find & Replaces but I have noticed that this function is always slower than other editors.
Cheers,
Mike