Page 1 of 1

invalidation on edit

Posted: Wed Jul 06, 2011 7:25 pm
by blsstdok
When text is typed into the editor, it seems that the entire paragraph is invalidated with each keypress.

I am doing a lot of CPU-expensive custom drawing and things get real slow when a paragraph becomes more than a few words; especially when it is more than two or three lines.

So, two questions:

1. Is there any way to limit the invalidation on character insertion to the word in which it appears, or at the most to the line in which it appears?

2. How can I "break up" a line paint into individual words per line, rather than an entire line at a time? This would allow me to cache the work per-word to avoid the CPU calculations on every redraw. Right now, it is sending a paint command for a run of text with the same attributes up to an entire line. I could do some caching if it was broken up by words (whitespace delimited) instead.

Posted: Thu Jul 07, 2011 2:25 pm
by Sergey Tkachenko
1. Sorry, no.
2. Text is broken into words only when ParaStyle.Alignment=rvaJustify.
This mode, obviously, increases memory usage.