title: Silverlight performance/profiling with AutomationPeers
body: <p>For accessibility Silverlight implements AutomationPeers, useful for Automated UI tests, screen readers etc.</p>
  
  <p>When profiling my SL app, I notice a lot of expensive calls related to AutomationPeers, such as <a href="http://msdn.microsoft.com/en-us/library/system.windows.uielement.oncreateautomationpeer%28v=vs.95%29.aspx" rel="nofollow" title="UIElement.OnCreateAutomationPeer">UIElement.OnCreateAutomationPeer</a>. Framework controls have implemented this, which results in unmanaged code calls, which are obviously expensive from SL's managed code.</p>
  
  <p>My question is, is this automation only enabled when you have an automation client running, like "Tablet PC Input Service"? I don't want these calls to be made because we will not be using any automation/accessiblity services, and our app is fairly resource intensive, so need to limit unnecessary calls, especially unmanaged ones.</p>
  
  <p>I am just unsure if this code is executing due to some automation client I don't know about running on my system, or if this will be executed on the client's systems as well? I don't want to have skewed profiling results.</p>