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.

cy.visit() performance degradation

See original GitHub issue

Current 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.

image

Loading the same page outside of Cypress automation takes fraction (~3 seconds) as the long TTFB period is not present

image

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: image

Versions

Affected versions: 7.2.0, 7.3.0, 7.4.0 Last working version: 7.1.0

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:4
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
cypress-bot[bot]commented, Aug 9, 2021

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.

0reactions
cypress-bot[bot]commented, Aug 16, 2021

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

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