-
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
Cypress 4.0.1 - Electron is 1.5x slower in a test spec #6388
Comments
We have the same issue. However, we noticed the speed tests degradation from version 3.8.2 to 3.8.3 (15 minutes slower). We thought that maybe the speed improves in version 4 but it is not. Versions
|
I have the same problem on Chrome: my tests takes 12 min on Cypress 3.8.3 and 19 min on Cypress 4.0.1 |
In compare with 3.6.1 we have the same issue with slowing down 15 tests from 1 min 50 sec to 2 min 50 sec - which is very significant for us. Cypress: 4.0.1 |
Same here: cypress run --headless --browser chrome (on windows 10) Cypress 3.8.3 with Headless chrome 80 --> specs run in 2:30 |
This comment has been minimized.
This comment has been minimized.
Hello, For information, I have the same issues as Olgagr, performance drastically slowdown when upgrading above 3.8.2 (3.8.3 + 4.0.2 tested) I see network calls for static resources are very slow (css, png,...) I'm running on Windows Now, on CI, which is running on Linux, no degradation with 4.0.2 nor 3.8.3 But I cannot migrate the test to fit 4.0.2 as it's really too slow in local :( (a bit like before this update https://www.cypress.io/blog/2019/05/22/how-we-improved-network-speed-by-300-in-cypress-3-3-0/) I'm for the moment downgrading to 3.8.2, would be glad to have an update on this |
For info, it's actually working on my personal PC We are using px software as proxy in local, I'm suspecting an issue with this Will keep posted here if I find a workaround |
Tried upgrading to 4.1.0 today after coming from 3.8.0 and got HUGE performance hit. Went from 7min runtime to 21Min+. Had to downgrade back to 3.8.0 Runtime with 3.8.0: 06:58 Runtime with 4.1.0: 21:02 It seems that when our client makes http requests while testing the app, it literally "freezes" up the browser(i cant interact with the webpage at all in this state) and ends up taking forever to run. I was able to replicate on my local machine using chrome and electron this behavior, and our linux docker image that cypress is installed onto also has this similar behavior in our build pipeline (electron headless) Other information. Our app runs on angular 8. The slowdowns seem to occur when having to use our search function, as in when the user types in letters it goes out and retrieves search results in real time. The Test runner timer at the top of the page will literally freeze. I verified in dev tools the API calls that are being made get registred latency of less than 100ms so its not my network being a issue. 3.8.0 does not have this issue. |
Just updated Cypress to 4.3.0 on my Windows 10 machine. Running with Chrome 80 headless and Cypress 3.8.3 => 3.47 minutes Is there any update on this, Cypress team? B.t.w. Going to a Linux machine is not an option at the moment ;-) |
This comment has been minimized.
This comment has been minimized.
tried with Cypress 4.5 today, and the performance is still extremely slow. each XHR request my client is trying to make takes FOREVER to resolve and the entire runner is just frozen up. Our organization is still on 3.8.0 because of this. I dont know if i can get a working example to use but i'll see. |
This comment has been minimized.
This comment has been minimized.
3.1.3 --> 4.5.0 |
Is there any future plan to fix the performance issue?... |
Same in our organisation. We're still running on We've ran same 5 jobs in TeamCity on the same agent for |
Same here. Since we are using Cypress to test an application which controls phone calls, we unfortunately rely on timing (calls only ring for 10 seconds for example). Upgrading to 4+ (even 4.7) brakes half of our existing test. Our dev machine + CI is also windows based, and tests are running at least 3-5 times slower. Happy to share a debug log or other information. |
Hi @jennifer-shehane, We would be happy to provide more info information or help fix this topic. |
Hi @jennifer-shehane or any other Cypress developer. Is there something you can say about when you going to look into this? |
The issueFrom the comments, there have been various mentions of performance hits:
Some people mention 3.8.3 being the breaking version, while others mention a version greater than 3.8.3 being the introduction of the performance issue. Additionally there is variation in mentioning which browsers and environments this happens on among the comments although the majority to mention Electron. From this, there can't be any real determination on which version, environment, or test code to focus on to narrow down the issue. Related issuesYour issue may have already been identified elsewhere, please refer to those issue if your issue looks similar.
We need a reproducible exampleThe original provided example is not runnable (the I don't doubt that there is some performance regressions, but we can't identify it without a reproducible example. Please comment in this issue with a reproducible example - one that shows marked performance issues in on specific version of Cypress versus an older version so that we can investigate. |
@jennifer-shehane , what error exactly do you have when running |
I have now been testing v5.0.0. and I do not see any significant improvement in performance to what has been discussed in this thread... Here's an example of the very same test run on one of our features with Electron, one with v3.4.1 (111.32s) and the other with v5.0.0 (232.50s), notice the different is quite significant: Cypress 3.4.1 Cypress 5.0.0 |
Hi, I tried it with cypress 5.0.0 on macOS Catalina 10.15.2. Running with Electron 78 headless and Cypress 3.8.3 takes 05:23 minutes We would like to update the package for quite some time now, any updates here dear Cypress team? |
Building off of this thread: #2970 (comment) we tried setting const sidebar = window.parent.document.querySelector('.reporter-wrap .container');
if (sidebar) {
sidebar.setAttribute('style', 'overflow: hidden;');
} On cypress@3.4.1, our test suite took about 1.75hrs. Of course this isn't entirely robust as the UI can change in future versions, and it doesn't necessarily fix the underlying issue, but it enabled us to upgrade cypress from 3.4.1 to 5.1.0 without inheriting the large performance hits described in this thread. One caveat is that in some recordings, it looked like the runner did not continually keep scrolling the command log, but in most instances it did. For local development, we did something similar, where we added a button to the UI that toggles the command log. Here's an incomplete snippet, but it should convey the general approach: const icon = document.createElement('i');
icon.setAttribute('class', 'fas fa-list');
const button = document.createElement('button');
button.setAttribute('class', 'toggle-command-log');
button.appendChild(icon);
button.onclick = toggleCommandLog;
button.setAttribute('aria-label', 'Toggle Command Log');
const newCommandLogExpandButton = document.createElement('span');
newCommandLogExpandButton.appendChild(button);
commandLogButtons.appendChild(newCommandLogExpandButton); We tossed both of these snippets into a |
we just tested @andrewmtam 's workaround and we got pretty good results as well. We've been trying to upgrade from 4.3.0, and every version was much slower, except 5.1.0 (which includes this PR) which was not as slow as the other, but still slower than our baseline with 4.3.0. Setting |
I quickly tested using a windowed list in the command log in #6783 (comment) and saw similarly good results. Probably some kind of large list efficient technique would be needed in the command log to solve the performance issues. |
We're investigating some performance issues related to the rendering of the Command Log such as #6783 where I think the solution to that may also solve this issue. Since there was never a reproducible example provided in this thread - we will have no way of actually testing if any solution we provide solves these however. But we'll followup in here when a PR is open for that. There are some cases where hiding the Command Log does improve performance, and this is what we're investigating - what in the rendering of the component is causing the slowdown and how we can improve that. |
Closing this issue as we have resolved SEVERAL performance issues over the year, especially in the last few months. Please upgrade to the latest version and open a new issue with a repro if you're experiencing performance issues. |
Current behavior:
In our project, we are updating Cypress from 3.5 to 4.0.1. See PR okTurtles/group-income#829
The same test spec "Large Group" takes 2:29m to run instead of 1:36m. The other specs take the same time. See run 284 - @3.5 vs run 285 - @4.01.
Desired behavior:
All specs should take the same time.
Test code to reproduce
npm install
grunt dev
npm run cy:open
The test in the spec taking too long is located at
test/cypress/integration/group-large.spec.js
. See file hereIf anything else is missing, please let me know.
Versions
The text was updated successfully, but these errors were encountered: