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.

Performance degradation between Appium 1.4.13 and 1.6.0

See original GitHub issue

The problem

We recently upgraded from Appium 1.4.13 to Appium 1.6.0. Following this upgrade we saw a huge performance hit in our tests to the point where individual actions (ex. element click) now take approximately 1500ms instead of 50msec which was the case with the previous version.

Environment

  • Appium version (or git revision) that exhibits the issue: 1.6.0
  • Last Appium version that did not exhibit the issue (if applicable): 1.4.13 (although we have not tested with the versions in-between 1.4.13 and 1.6.0)
  • Desktop OS/version used to run Appium: OSX El Capitan
  • Node.js version (unless using Appium.app|exe): 4.6.0
  • Mobile platform/version under test: iOS 8.4
  • Real device or emulator/simulator: Emulator
  • Appium CLI or Appium.app|exe: CLI

Details

Our automated testing stack consists of Appium, Protractor and Cucumber. We recently upgraded from Appium 1.4.13 to 1.6.0 and found our tests becoming extremely slow. We have tested with a single Cucumber directive, which looks for an element, scrolls to it and clicks it, in order to try and identify the source of the problem, and it seems that every single action is taking around 1500msec instead of around 50msec which was the case with the earlier Appium version. More specifically, our Cucumber directive does the following (code included at the end of the issue):

  • Wait for an element to appear in the DOM
  • Check if the element is visible
  • Scroll to the element
  • Click the element

We are logging the time needed for each action to be performed and we are seeing the following times between Appium 1.4.13 and 1.6.0

  • Wait for element 78 msec with 1.4.13 vs 1542 msec with 1.6.0
  • Check if visible 40 msec with 1.4.13 vs 1552 msec with 1.6.0
  • Scroll 11 msec with 1.4.13 vs 515 msec with 1.6.0
  • Click 57 msec with 1.4.13 vs 1551 msec with 1.6.0

We have repeated our tests several times, and each time the results are similar. Unfortunately due to this delay we practically cannot run our tests, since they now need several hours to run instead of a few minutes, and since we need Appium 1.6.0 to support XCode 8 we are pretty much blocked. Please note that these results are with XCode 7 (since we needed to be able to compare the two Appium versions) but we are seeing a similar delay with XCode 8 (using iOS 10.0 and the XCUITest automation) as well.

Link to Appium logs

Code To Reproduce Issue [ Good To Have ]

The test Cucumber directive we are using:

this.When(/^I click "(.*)"$/, function(field, next) {
      var startTime = new Date().getTime();
       console.log(new Date());
      var scrollToScript = 'document.querySelector("' + selector.css(field)+ '").scrollIntoView();';
      this.helpers.waitUntilElementIsInDom(field, function (theElement) {
          var time1 = new Date().getTime() - startTime;
          console.log(time1);
          theElement.isDisplayed().then(function (isDisplayed) {
              var time2 = new Date().getTime() - startTime - time1;
              console.log(time2);
              browser.driver.executeScript(scrollToScript).then(function() {
                  var time3 = new Date().getTime() - startTime - time1 - time2;
                  console.log(time3);
                  theElement.click().then(function () {
                       var time4 = new Date().getTime() - startTime - time1 - time2 - time3;
                       console.log(time4);
                       next(); 
                  });
              });
          });
      });
  });

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:26 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
VasilijSviridovcommented, Mar 6, 2017

it seem that performance issue is seen only on hybrid apps( using webview), might be helpful for fixing issue with performance.

1reaction
pmegremiscommented, Dec 5, 2016

Does Appium 1.6.2 contain fix for performance issue that is described in this ticket?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to start server using Appium V 1.6.3 and xocde 8.3
Attempting to start appium server programatically using AppiumDriverLocalService. As I encountered 'iDevice Installer issue' with earlier ...
Read more >
Source - GitHub
*NOTE*: Appium 1.5 is a complete rewrite of Appium from the ground up. Every effort has been made to avoid any breaking changes...
Read more >
automation - How to install / upgrade Appium 1.6.3 / 1.6.x with ...
So here are the steps to use AVM to install Appium after version 1.5.0 and keep switching between as many instances of Appium....
Read more >
homebrew-core - Homebrew Formulae
a2ps 4.14 Any‑to‑PostScript filter aacgain 1.8 AAC‑supporting version of mp3gain aalib 1.4rc5 Portable ASCII art graphics library aamath 0.3 Renders mathematical expressions as ASCII art
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