We have several instances where the performance is extremely inconsistent when setting properties of a control. Our 2 biggest areas of concern are edit controls and combo boxes with virtualized lists. For the edit control I was able to isolate where the issue is.
This path takes from 2 seconds to over 2 minutes depending on the run. Nothing changes on the test machine between runs.
WpfEdit myEditCtrl = GetEditControl(); myEditCtrl.Text = "New Text";
GetEditControl returns the real control, so no searching is happening on setting the text.
The following code is so fast I am down to milleseconds
WpfEdit myEditCtrl = GetEditControl(); Mouse.Click(myEditCtrl); Keyboard.SendKeys("New Text");So what is the engine doing that can take over 2 minutes to set the text, and makes it very inconsistent?