find replace

Hi

I am replacing some string occurances with empty string in all files under one directory using

find ./ -name "*.dmp" | xargs perl -pi -e 's/\\N//g' |

its taking too much time for replacing and redirecting to same file in the same directory.

Similarly afterwards i am finding last character of each line.If last character is semicolon i am removing it.If last character is not semicolon i am appending next line to present line using
sed -e :a -e '/;$/!N;s/\n//; ta' -e 's/;$//'

But this is also taking too much time for the operation.

I am doing above operation without looping.

Can anyone have a look at it?

does this directory contain a thousand *.dmp files?

Yes it contains thousand.dmp files