question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Is there any way to improve the performance of WDA?

See original GitHub issue

Using the script below, I compared the performance of find element API between WDA v4.8.0 and v4.7.0 with Xcode 13.4.1. The result indicated that both median and average of the response time of the API increased around 30%.

WDA version v4.7.0 v4.8.0 v4.10.2
average (ms) 160.9 209.27 211.13
median (ms) 160 208 209

I believe https://github.com/appium/WebDriverAgent/commit/1c1a8060ffcaeef59b537da62c7a37dd0c6b9eb7 since WDA v4.8.0 is essential to support Xcode 14.X, it is a great work. The comparison is conducted with Xcode 13.4.1 because WDA 4.7.0 doesn’t work with Xcode 14.X. Therefore, I’m not sure it can be also slow when it comes to using WDA 4.8.0 with Xcode 14.X (I have no idea to compare the performance with Xcode 14.X). But, I would love to ask if there’s a chance to improve the performance at WDA side.

Minimal Reproducible Example

const wdio = require("webdriverio");

const options = {
  logLevel: 'silent',
  port: 4723,
  capabilities: {
    'appium:automationName': "XCUITest",
    'appium:platformName': "iOS",
    'appium:platformVersion': "15.5",
    'appium:deviceName': "iPhone 12",
    'appium:app': "/Users/mwakizaka/Documents/10_projects/magic-pod-repo/apps/UIKitCatalog.zip",
    'appium:newCommandTimeout': "60",
    'appium:useNewWDA': true,
  }
}

const main = async () => {
  let driver;
  try {
    driver = await wdio.remote(options);
    for (let i = 0; i < 100; i++) {
      await driver.$("~Activity Indicators");
      await driver.$("~Alert Views");
      await driver.$("~Buttons");
      await driver.$("~Date Picker");
      await driver.$("~Image View");
      await driver.$("~Page Control");
      await driver.$("~Picker View");
      await driver.$("~Progress Views");
      await driver.$("~Search");
      await driver.$("~Segmented Controls");
    }
    
    console.log("The end");
  } catch( err ) {
    console.log(err);
  } finally {
    if (driver) await driver.deleteSession();
  }
}
main();

Environment

  • Operating system: macOS 12.6
  • If running via appium CLI…
    • Appium CLI version (output of appium --version): 2.0.0-beta.46
    • Node.js version (output of node --version): v16.13.2
    • npm version (output of npm --version): 8.1.2
    • Last appium version which did not exhibit the problem: N/A
  • If running Appium Desktop, its version: N/A
  • Appium driver(s) and their version(s): xcuitest@4.12.2 with WDA4.10.2, xcuitest@4.7.3 with WDA4.8.0, xcuitest@4.7.2 with WDA4.7.0 [installed (NPM)]
  • Appium plugin(s) and their version(s): N/A
  • Platform and version under test: iOS 15.5
  • Real device or emulator/simulator: simulator
  • Xcode: Xcode 13.4.1 Build version 13F100

Link to Appium Logs

the performance comparison

perf_WDA4.8.0_vs_WDA4.7.0.xlsx

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:14 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
mwakizakacommented, Nov 26, 2022

Thank you so much for your change! it looks so performant on both Xcode 13.4.1 and Xcode 14.1

Xcode 13.4.1 (intel mac)

  • accessibility id
WDA version v4.7.0 v4.8.0 v4.10.10
average (ms) 179.442 224.113 175.863
median (ms) 176 223 179
  • ios class chain
WDA version v4.7.0 v4.8.0 v4.10.10
average (ms) 173.257 228.385 175.56
median (ms) 174 220 175
  • ios predicate string
WDA version v4.7.0 v4.8.0 v4.10.10
average (ms) 178.808 222.912 175.001
median (ms) 178 222 177

Xcode 14.1 (m1 mac)

  • accessibility id
WDA version v4.8.0 v4.10.10
average (ms) 132.332 114.943
median (ms) 129 112
  • ios class chain
WDA version v4.8.0 v4.10.10
average (ms) 132.156 115.006
median (ms) 130 112
  • ios predicate string
WDA version v4.8.0 v4.10.10
average (ms) 135.916 115.527
median (ms) 132 113
2reactions
mykola-mokhnachcommented, Nov 26, 2022

Good, I’m happy these patches did the job. Closing the issue as fixed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Improve performance of WDA using Custom Controller
Hi all, I am trying to improve the performance of a WDA not developped by me, I saw that into the WDA the...
Read more >
WDA: An Improved Wasserstein Distance-Based ... - NCBI
Thus, we introduced an improved Wasserstein distance-based transfer learning method (WDA), which learns transferable features between ...
Read more >
WDA: An Improved Wasserstein Distance-Based Transfer ...
Thus, in this paper, we propose a new method with excellent domain adaptive ability based on Wasserstein distance (WDA) in order to deal...
Read more >
WDA: An Improved Wasserstein Distance-Based Transfer ...
Thus, we introduced an improved Wasserstein distance-based transfer learning method (WDA), which learns transferable features between ...
Read more >
WDA Cluster Strategy Guides WF System to Demand-Driven ...
than 25 statesi have adopted cluster strategies as the way to do business in ... It is in the best interest of employers...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found