Scripts are running very slowly

I am using below configuration:
Xcode : 8.2
Appium: 1.6.1
Mac OS: 10.11
Device OS: 9.3
I am facing issue that some steps in the scripts are taking too much to get execute. I think appium first finding all the elements from the screen and then executing the step. Earlier I was using iOS device with appium 1.6.3, back then I was not facing this issue and also same scripts were working smoothly with appium 1.5.3 with iOS 9 device.

So what is causing this issue? Is it iOS 9 with appium 1.6.1 and xcode 8? If so what is the solution?

Appium logs are capturing something like this:
t = 565.13s Use cached accessibility hierarchy for Name of bundle id I am using
t = 565.48s Find: Descendants matching type Any
t = 565.83s Find: Element at index 6
t = 565.85s Find the Any
t = 565.85s Use cached accessibility hierarchy for Name of bundle id I am using
t = 566.19s Find: Descendants matching type Any
t = 566.55s Find: Element at index 7
t = 566.56s Find the Any
t = 566.56s Use cached accessibility hierarchy for Name of bundle id I am using
t = 566.91s Find: Descendants matching type Any
t = 567.26s Find: Element at index 8
t = 567.27s Find the Any
t = 567.28s Use cached accessibility hierarchy for Name of bundle id I am using
t = 567.62s Find: Descendants matching type Any
t = 567.97s Find: Element at index 9
t = 567.99s Find the Any
t = 567.99s Use cached accessibility hierarchy for Name of bundle id I am using
t = 568.34s Find: Descendants matching type Any
t = 568.70s Find: Element at index 10
t = 568.71s Find the Any
t = 568.71s Use cached accessibility hierarchy for Name of bundle id I am using
t = 569.06s Find: Descendants matching type Any
t = 569.41s Find: Element at index 11
This index keep on increasing and it takes forever to execute one simple click. Please advice.

Give the Appium 1.6.4 beta a try. I too was seeing similar issues that seemed to get better in the latest beta.

Will appium 1.6.4beta work on iOS 9 device because I was facing issues while trying to run script with appium 1.6.3 on iOS 9 device?

I would assume so as long as you are using XCUITest on iOS 9.3

@Brian_Watson I am also experiencing great slowness with 1.6.3. Are you saying that that 1.6.4 is faster?

So my original issue I was talking about here was a delay of minutes each interaction of a control when running with Appium 1.6.3. When I installed the 1.6.4 beta, this issue went away and now it’s a delay of 5 or so seconds each control. I saw some comments that another change has recently been made to the code to try and make iOS interactions faster, so I’m waiting for the official release of 1.6.4 to be released to see if this helps.

So just for some perspective could you kind of give some timeline for a scenario? Like, for instance, I read on some forum that someone who took 3 minutes to run a particular TC with 1.6.3…was taking 1 minute now with the advent of 1.6.4.
Sounds too good to be true, but would you vouch for that as well?

My issue was that every time it went to search for a control, it would always seem to take the max timeout (15 seconds in my case) to return a found element. Now instead it takes 4-5 seconds. So yes, it could cut a lot of time off of a total test run.

But I also am currently trying to compare the time it took to run these scripts under Appium 1.5.3 and compare it to the new 1.6.4-beta. I am still seeing the new Appium 1.6 (XCUITest) be slower then the old Appium 1.5.3 (UIAutomation). I just need to find time to document it if needed.

so, 1. where are you setting that 15-second timeout? (as in is it a part of your explicit wait, or an implicit wait?) or you are setting the newCommandTimeout capability?

  1. if you changed that to zero, was it still taking 15 secs ?