cy.visit() performance degradation
See original GitHub issueCurrent behavior
We’re using Cypress to test large pages (several megs) and noticed severe performance degradation since upgrading to version 7.2.0
. It takes over 20 seconds to visit the page. Majority of time is spent on TTFB. We have also noticed considerable increase in memory usage.
The problem persists with versions 7.3.0
and 7.4.0
.
Loading the same page outside of Cypress automation takes fraction (~3 seconds) as the long TTFB period is not present
Desired behavior
Loading the page via cy.visit();
should take similar time (~3 seconds) as it does when visiting the page in browser and as it did prior to version 7.2.0
.
Test code to reproduce
Fork with repro: https://github.com/milankonir/cypress-test-tiny
Screenshot from repro:
Versions
Affected versions: 7.2.0
, 7.3.0
, 7.4.0
Last working version: 7.1.0
Issue Analytics
- State:
- Created 2 years ago
- Reactions:4
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Best Practices - Cypress Documentation
visit() GitHub, you can use cy.request() to programmatically interact with GitHub's APIs directly. This avoids ever needing to touch the UI of another ......
Read more >Cypress cy.intercept Problems - Gleb Bahmutov
visit command. By the time cy.intercept runs, the call is already in progress, and thus not intercepted. Cypress shows XHR calls by default...
Read more >What's New in Cypress 10 - Automated Visual Testing
visit() to open your application, you use cy.mount() to render out your React, Vue, Angular or other component and test it in isolation....
Read more >Cypress Best Practices For Test Automation - LambdaTest
In a nutshell, the difference between cy.request() and cy.visit() is that ... failing tests and slowing down your testing performance.
Read more >End-to-End Testing with Cypress and Auth0
Cypress 9.6.0: Easily test multi-domain workflows with cy.origin (Blog post) ... Visit the web application and invoke a redirect to the Auth0 login...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The code for this is done in cypress-io/cypress#17408, but has yet to be released. We’ll update this issue and reference the changelog when it’s released.
Released in
8.3.0
.This comment thread has been locked. If you are still experiencing this issue after upgrading to Cypress v8.3.0, please open a new issue.