UIAutomation performance decreasing with application running time

Viewed 41

Here is the problem: I have a WPF application which uses UIAutomation in order to create a navigation tree of another WPF application for documentation purposes.

The fact is that on some machines the performance of the single calls decrease drastically with running time. For example a single AutomationElement.FindFirst() call gets 0.3 seconds to execute at the beginning, while the same call gets more than 30 seconds to execute if called 20 minutes after the application start(applied to the same AutomationElement of the WPF application of course). It is not a RAM-related issue, since the RAM taken by the application itself is very small and the RAM overall usage is far from being full.

This anyway only happens on some machines, while on others it does not (the time taken for a single call is almost the same from start to end). The machines are all windows 10. The problem is not the slowness itself, but the fact that it gets MUCH SLOWER OVER TIME.

Does anyone know how to resolve the issue, or what could be the problem causing it?

0 Answers
Related