I didn't go through the code. One question: do you create and render the text completely from scratch each time ? Maybe you can do a diff between the old and new one each time and jump to the section closest to the first changed location ?
I didn't go through the code. One question: do you create and render the text completely from scratch each time ? Maybe you can do a diff between the old and new one each time and jump to the section closest to the first changed location ?