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)...
<Grid.RowDefinitions>
<RowDefinition
Height="117" />
<RowDefinition
Height="*" />
<RowDefinition
Height="20" />
</Grid.RowDefinitions>
// Replace functionality below
Editor.BeginUndoGroup();
foreach (TextRange range in Results)
{
RadDocument.Selection.Clear();
RadDocument.CaretPosition.MoveToPosition(range.StartPosition);
RadDocument.Selection.AddSelectionStart(range.StartPosition);
RadDocument.Selection.AddSelectionEnd(range.EndPosition);
Editor.Insert(replaceText);
}
Editor.EndUndoGroup("Replace");