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.
invalidation on edit
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact: