in reply to efficient text processing

Some of the ideas in thread 723032 may assist.