Cypress: Upgrade to Cypress 3.7.0 makes everything 10 times slower!!

Created on 29 Nov 2019  路  21Comments  路  Source: cypress-io/cypress

After upgrading to cypress 3.7.0 everything become extremely slow!! On cypress 3.6.0 it typed 50 words in maybe 1 second.. now it is one letter per second..

Didn't change anything and rolled back to 3.6.0 and it is normal again.

Win10/Cypress v3.7.0

All 21 comments

When opening an issue, please fill out the issue template provided - it requires necessary information we need to help you, like desired behavior and a reproducible example.

Please comment in this issue with a complete reproducible example of your issue (including the information we asked for). If not provided, we will be closing this issue - this does not mean that your issue if not happening, it just means we have zero way to move forward.

We have performance tests and tests for typing. There is likely something very specific with your configuration, tests, network, OS that we need to reproduce.

On 3.4.1

Screen Shot 2019-12-04 at 11 23 05

on 3.7.0
Screen Shot 2019-12-04 at 11 23 09

Nothing changed in the code, it's the same test. It's a test where Cypress has to write a lot, i didn't see noticeable performance differences in other tests.

Angular 8/Chrome 69/ Cypress 3.7.0

Now we have to increase our CI build time limit to cope with the newer version by like 5-10 minutes, up from 25 minutes.

These are the tests that saw the biggest increase in time. They both rely heavily on typing, especially * test 2*

TEST 1

  • aws chrome 69 -> 113 secs [cypress 3.4.1]
  • aws chrome 69 -> 158 secs [cypress 3.7.0]
  • local chrome 78 -> 104 secs [cypress 3.7.0]
  • local electron 73 -> 96 secs [cypress 3.7.0]

TEST 2

  • aws chrome 69 -> 141 secs [cypress 3.4.1]
  • aws chrome 69 -> 217 secs [cypress 3.7.0]
  • local chrome 78 -> 112 secs [cypress 3.7.0]
  • local on electron 73 -> 106 secs [cypress 3.7.0]

Times increased a lot but it seems that running it locally is not affected.

@jennifer-shehane why more recent versions of cypress are slower? is it because more things are being done in between key presses?

In our case we had a bug in different component which was constantly queering backend - that fact made cypress 3.7.0 totally unusable.. 3.6.0 was doing "fine".. once we fixed that bug, v 3.7.0 seems to get back to "normal" - so at least its not timing out etc.

Reverting to 3.4.1 as this issue is too pronounced. We鈥檒l check back after the new year

@jpike88 @AlbertoMontalesi The tests running slower is not intended behavior. We agree that this is a very bad experience and would like to address the issue as soon as possible.

Unfortunately, no one has provided enough information to reproduce the issue. We have a lot of tests - including performance tests, and likely there is something very specific in your tests or setup that we need in order to get started. Even some idea of the type of tests you are running would be helpful.

It's a test where Cypress has to write a lot

What does the above statement mean exactly? What tests are you writing?

They both rely heavily on typing

Can you please provide an example of the tests you are writing and typing.

We use angular 2, and build using fuse-box as a bundler. It's very difficult to isolate an example in a zip file.

If I gave you our staging address and a dummy login, and showed you the problematic dialog, would that be enough?

They both rely heavily on typing

He means a test where a lot of text fields are being filled out, the issue appears to be heavily pronounced in those tests.

https://github.com/cypress-io/cypress/issues/5824#issuecomment-561470907

Those numbers are the test in question, and the numbers blew up only when cypress got updated.

React 16.8 / Chrome 69 / Cypress 3.7.0 so slow too

Thanks for clarifying the slowness seems to revolve around using cy.type().

In an attempt to recreate this issue, I have ran our type_spec.js file which we use internally to test every example of typing we have ever tested (469 tests).

The results of the timing is below:

cypress open

  • Cypress 3.8.0 (Chrome 78): 271.63
  • Cypress 3.8.0 (Electron 78): 234.93
  • Cypress 3.7.0 (Chrome 78): 249.4
  • Cypress 3.7.0 (Electron 73): 258.38
  • Cypress 3.6.0 (Chrome 78): 241.94
  • Cypress 3.6.0 (Electron 73): 222.53

cypress run

  • Cypress 3.8.0 (Chrome 78): 244
  • Cypress 3.8.0 (Electron 78): 224
  • Cypress 3.7.0 (Chrome 78): 213
  • Cypress 3.7.0 (Electron 73): 182
  • Cypress 3.6.0 (Chrome 78): 227
  • Cypress 3.6.0 (Electron 73): 176

Please provide more information. We would really like to address this issue. Some things to consider providing us?

  • What type of inputs are you typing into? text, email, textarea?
  • Are there any special event listeners on the input?
  • Are you passing any options to cy.type()
  • How many inputs are you typing into on the page? Is it 10? Is it 1,000?

Please help us help you by providing more information. I ran every test we have and there is no indication of performance issues between 3.6.0 and 3.7.0 with every example we have. Likely there is something special in your app / tests that we need to know.

If I gave you our staging address and a dummy login, and showed you the problematic dialog, would that be better?

@jpike88 Yes, anything that we can run on our machine and actually see the performance issues would be ideal because now we have nothing. You can email to [email protected]

@jennifer-shehane email sent

We are having the same issue to the point that a test never finishes. It seems to be cumulative in the sense that the more tests that type the slower it gets.

@MikeRhyneDHI Please provide a reproducible example. We have tried several routes of reproducing this and cannot. We want to help fix this issue but can't until someone provides the test code they are writing. Again:

  • What type of inputs are you typing into? text, email, textarea?
  • Are there any special event listeners on the input?
  • Are you passing any options to cy.type()
  • How many inputs are you typing into on the page? Is it 10? Is it 1,000?

I should add that we are running 3.4.1 and upgrading to 3.8.0 does fix the issue but seems to slow down all tests in general as noted in in other issues so we have stuck with 3.4.1 for now. The input is for an email address and yes we have validations listening to the input. No options passed to cy.type() but have tried force. There are 3 inputs and 1 text area in a modal. I have not had the time to try to reproduce this in something that I can send you. I can try different versions to see if that helps narrow it down. On a windows based machine the issue isn't near as bad but MacOS/Linux are very slow. I have wondered if it's tied to a Chromium or Electron release and not so much Cypress.

We are entirely Mac/Linux, our CI tests run on amazon Linux FYI... still trying to root the issue. Have had email correspondence with cypress and an investigating further.

We are having the same issue where upgrading to 3.8 actually made all of our tests take a bit longer. From an overall duration of 14 minutes to more than 19 minutes to run the same specs.
I couldn't reproduce it locally, seems to be happening in CodeBuild, not sure if it's tied to the fact that it uses Chrome 69 or not. I only tested locally on Chrome 79 and Electron 78 and both were taking the same amount of time in either Cypress 3.4 or 3.8.

@AlbertoMontalesi Please, we need a reproducible example. No one has provided one so far and we cannot investigate until this is provided.

Unfortunately we have to close this issue as there is not enough information to reproduce the problem. This does not mean that your issue is not happening - it just means that we do not have a path to move forward.

Please comment in this issue with a reproducible example and we will reopen the issue. 馃檹

Was this page helpful?
0 / 5 - 0 ratings