For medium to larger size files (10k words to 100k words) I'm having trouble with performance. CPU usage is actually quite low, but the control is under performing the larger the files become. For example:
I have a 10k word file. Search is lightning faster (fantastic), but replacing is horribly slow, ~10 inserts per second (this gets worse as the file grows). I've wrapped the replace process in a Begin and EndUndoGroup, but that seems a nominal improvement. (see pseudo-snippet below)
I also have a 100k word file that is essentially unusable in the control. It is plain text, no images or extraneous formatting. It takes 1-5 seconds for keystrokes to register. I've throttled documentchanged event to 10 seconds. After importing the same document into the Telerik demo project (TelerikEditorDemo_WPF) I'm noticing the same performance issue. Again, cpu usage is quite low.
Is there any optimizations that can be done to help with these issues?
With UI virtualization is it normal to see 1G+ memory usage by opening up a ~100k word document (700KB file)?
My grid containing the control (row 1)...
// Replace functionality below
foreach (TextRange range in Results)