-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Execution time increased drastically after upgrading from 8.3.0 to 8.6.0 #18564
Comments
In our case, we noticed that going from Cypress
Which is an increase of about 21% in the overall test time. Not sure what could be the source of this, but hopefully, this can be improved in the coming versions? NB: Not sure if this is related, but we have also seen these warnings in our CI with the 8.6 version:
|
We also saw an increase from 8.5 - 8.6 would be interesting to hear if the first 2 reports are also better in 8.5. |
For us increases of about 50%+ in going from 8.4 to 8.6 |
I reviewed the commits between 8.5 and 8.6 and it’s most likely the electron upgrade, but I couldn’t see why that would cause this. I don’t have the time to investigate this in detail but if I did I would hit bisect using the master ci builds whilst they still exist to confirm which commit did it for sure |
In our case we tried today moving to Cypress 8.7 and we are seeing some tests taking nearly double the time especially when running them in GitHub Actions. Sticking to 8.5 for the moment. But we also understand it could be Electron 93 making it slower. |
Experiencing the same here when upgrading from 8.5 > 8.7. Everything works fine when running cy:run locally. I have noticed that tests that make several cy.request() calls at the beginning started failing completely, other tests were taking anywhere from 25% - 100% longer on GitHub Actions. Rolled back to 8.5 and all is fine again. |
i can confirm the issue is coming from electron. when i switch the browser to chrome via cypress.yaml, the issue disappears. the video playback issue that i mentioned in #18740 also doesn't happen on chrome. i'm running cypress in CI via cypress-io/github-action@v2. here's the config from cypress.yaml for switching a browser, in case it helps somebody:
|
We have observed the exact same problem moving from 8.3 to 8.6. Our test pipeline of 136 tests in 22 specs had its runtime escalate from ~30 minutes to over 2h (we're using Chrome, not Electron). Disabling video recording made a difference, but moving back to 8.3 had the most impact. |
This slowness still seems to happen, for us, in the same proportion as described here in version 9.0.0 |
is the team aware of this issue yet? |
We are also experiencing the same issue - recent versions are much slower(both locally and in CI) and we are stuck on version List of similar issues:
|
For what it is worth, I have tried 7.5.0 for our project (instead of 8.5.0) and I see no further performance improvement (compared to downgrading to 8.5.0 from 8.7.0). So, no, it's not the case of Wirth's law, and cypress is not getting slower the further we go, but there's clearly a performance regression in 8.6.0. |
Sorry for the lack of response so far - performance regressions are something we take fairly seriously, and it's been causing us pain internally as well, due to much of our automation becoming flaky due to increased runtimes. While we haven't pulled this ticket in specifically, it seems like at least some of this may be related to changes in how electron handles failed requests while under test automation control - @mjhenkes may have more information on that subject. |
@helenaritson Thanks for showing the graph. I'm also holding the upgrade and in 8.3.1 now. Like the graph showed, we see a sizable increase from 8.3.1 to 8.7.0, and we had to roll back the upgrade. I will wait to see further performance data for later versions, and wait. |
Can anyone provide a reproducible example that we can run to reproduce the performance issue? |
I have no sample (yet), but I have tested our code base with the following versions (8.4 8.7 9.0) with different browsers (Electron Chrome Firefox). While I could discern some relevant differences between versions and browsers (runtime is between 6 and 8 minutes), none are as big as running this same code base on the az Pipelines ubuntu image on the cypress/included docker image (~50 minutes). Not testable with version 9: I will try to distil a sample. |
I don't have exact comparison as others but noticed our CI runs going from 35mins in 6.x and 7.x to 50-55mins for 8.7.0 as for now with little to no changes in amount of TCs run. |
hello, it's hard to get the time to create a reasonable reproduction example for something that global (demo stack, demo tests, benchmark). |
Is it possible the real world app can be used as a reproduction case? I'm not sure if failing tests are a contributor (I feel like they are, but have not checked) or if the RWA has any that currently fail. |
Our experiments shows that cypress 8.5.0+ uses a lot more cpu. We tested in docker container limited to 4 cores and 8gb of memory:
8.5.0 is also pretty similar in execution time even with 2 cores only, only a little bit slower. However if we ran 8.5.0+ without docker limiting cpu usage, it took like 900% of cpu (the processes in total) and 9.1.1/9.2.0 took around 1h 30min. So it seems to me that the cpu usage is doubled/tripled and that is causing the slowing down if you have limited cpu resources. |
I have the same problem. I switched to using chrome browser on CI runs and this brought running times back to normal so that I can upgrade Cypress |
still experiencing this issue with v9.3.1: our current setup is v8.7 + chrome
|
Experiencing the same issue here upgrading cypress from 8.4 to 9.4.1 |
Experiencing the same issue here upgrading cypress from |
Same with our solution. Time doubles with electron running on azure. With chrome cypress is a fast as it was before. Is it possible to fix something to run electron again or is it recommended to use chrome only? |
Switch to chrome was not an option. Now we have a problem with same major Chrome versions check. You passed the --parallel flag, but we do not parallelize tests across different environments. This machine is sending different environment parameters than the first machine that started this parallel run. The existing run is: In order to run in parallel mode each machine must send identical environment parameters such as:
This machine sent the following parameters: { |
More follow-up in terms of performance regressions since 8.3. We've managed to stabilise the runtime for our 28 specs (147 tests) around the 30 minute mark with the 9.x release by disabling videos, disabling test recording in dashboard, disabling parallel runs and switching from Electron to Chrome. Today, as a test I've moved the entire setup to Cypress 10.0.1. Same base image, same specs, same config, just newer Cypress release. It (barely) managed to execute 12 specs before the 60 minute runtime limit killed the job. It took 16 minutes on a dev laptop. The way I see it, something has dramatically changed in how Cypress behaves in CI/headless environments, running inside a docker container, since the 8.3 release. It's really becoming unusable at this point. |
I understand it is not helpful, but I just want to echo that we are seeing the same degradation as described above on our (proprietary) suites, gradually getting worse from Cypress 7 to 9.7. Due to reports of even worse performance we are holding off migrating to 10 - unfortunately CI performance is almost unusable for us at this point. My only observation is that this ONLY seems to affect CI/headless mode. Running If there is anything we can do to help dissect this issue, please let me know. I am not sure where to start looking. |
We got some changes out in 10.3.0 which might fix your issue - no promise it's the same problem, but we've had one company report a 2x speedup in 10.3.0 compared to 10.2.0 (and 9.x). |
@BlueWinds tested 9.7 vs 10.3.1 on one of our suites and saw an improvement of about 3 minutes (roughly 40% relative to average runtime under 9.x), awesome stuff!! |
We have some additional speedups in the pipeline. #22353 (comment) is about component testing, but the currently top candidate applies to e2e testing as well, cutting off about 300ms from loading every spec. There's also V8 snapshots, which are a bit further out (and unclear exactly how much time they'll save - some, but too early to quantify yet). The currently work on Detached DOM (#7306) should bring some performance improvement as well, though not on the scale of the other two tickets mentioned. |
That is a lovely benchmark and graphic, thank you for putting it together. If you could try the same under 10.3.1, it would be great to see how much further we still have to go to get back to the fast old days. |
Upgraded from 9.6.1 to 10.3.1 and test run time cut by about 3-4min, about 25% faster. |
I saw that there were performance improvements mentioned in the changelog for 10.8.0, but running one of our existing test suites showed that this issue still is not resolved. Over the last 3 months on 8.1.0, the average runtime for the suite is 11m 44s, but my test on 10.8.0 took 30m 20s. |
@bbartizek - If you could provide us with a specific test which runs slower on 10.x, I'd love to look into it more. I certainly believe it's happening, but in order to look into it, I first need to be able to isolate a case and examine it. I don't have access to your tests quite, so it running slower isn't much help in figuring out what the problem is. It's also very hard to compare across a gap of multiple major versions and a huge amount of code change, even if we have a specific test which does run slower on newer versions. I understand the frustration, but unless you can help track down the problem, I'm not sure what else we can do beyond continuing to look at performance and making incremental improvements (which we are). 🤷♀️ |
@BlueWinds have you tried running any test suite on 8.3.0 vs 8.6.0 (and then vs the latest version)? What are your timings? |
I'm saying 8.3 vs 8.6 was a long time ago, and we (like the majority of projects) don't usually tend to support old versions. We would welcome help identifying exactly what is now slow and improving it. But "still slow" is not useful or productive. |
Since this issue hasn't had activity in a while, we'll close the issue. We won't be investigating issues for 8.x releases and recommend upgrading to a later version of Cypress. |
Has anybody done any measurements to confirm that the latest releases don't have this issue? |
I know it's just a single datapoint, but we're currently running 226 tests in 38 specs averaging 4:00 minutes per run with 8-way parallelisation on 13.1. You can compare that to where we were just a year ago (a world of pain, in short). |
Current behavior
After upgrading cypress from
8.3.0
to8.6.0
, execution time of our tests (same amount of tests/suits) increased by ~10 min (almost doubled the initial time to execute).Current execution results (version
8.6.0
):Desired behavior
We'd expect, that execution time stays the same or gets lower with cypress update, not increase almost two times.
Previous execution results (version
8.3.0
):Test code to reproduce
yarn upgrade [email protected]
Cypress Version
8.6.0
Other
Currently had to revert back to 8.3.0, because otherwise builds time out (due to the 30m aws-amplify build timeout setting).
The text was updated successfully, but these errors were encountered: