Since this is a problem with the web browser UI, there is no way to keep this from being slow. You need to come up with a way of getting around having the user paste a boatload of text into a textarea
.
One way could be to replace the input field with a file upload so that the user could upload the txt file directly.