Skip to content
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

cy.visit() performance degradation #16671

Closed
milankonir opened this issue May 25, 2021 · 5 comments · Fixed by #17037 or #17408
Closed

cy.visit() performance degradation #16671

milankonir opened this issue May 25, 2021 · 5 comments · Fixed by #17037 or #17408
Labels
type: performance 🏃‍♀️ Performance related type: regression A bug that didn't appear until a specific Cy version release v7.2.0 🐛 Issue present since 7.2.0

Comments

@milankonir
Copy link

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

@jennifer-shehane jennifer-shehane added type: regression A bug that didn't appear until a specific Cy version release v7.2.0 🐛 Issue present since 7.2.0 labels May 25, 2021
@jennifer-shehane
Copy link
Member

jennifer-shehane commented May 25, 2021

Yah, wow, I can reproduce this. Thanks for providing a reproducible example, this helps.

The site load event fires 20 seconds slower in 7.2.0 than in 7.1.0. I tracked this down to being introduced in #16113, where we downgraded electron. I had to pass in contextIsolation to get this commit to run, so I guess it's also possible that the contextIsolation change is the root cause: 48fe3fb It's weird because this issue isn't present in 7.0.1.

Issue not present: d4e4885
Issue present: 7b55863

7.1.0

5-secs-test

7.2.0

25-secs-test

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jul 12, 2021

The code for this is done in cypress-io/cypress#17037, but has yet to be released.
We'll update this issue and reference the changelog when it's released.

@jennifer-shehane
Copy link
Member

Reopening as we are reverting the previous PR to avoid possible performance implications for many users on low resources machines recording video. We'll continue investigating and hopefully move towards updating Electron to fix this issue.

@jennifer-shehane jennifer-shehane added stage: ready for work The issue is reproducible and in scope and removed stage: pending release labels Jul 20, 2021
@cypress-bot cypress-bot bot added stage: needs review The PR code is done & tested, needs review and removed stage: ready for work The issue is reproducible and in scope labels Jul 20, 2021
@cypress-bot cypress-bot bot added stage: pending release and removed stage: needs review The PR code is done & tested, needs review labels Aug 9, 2021
@cypress-bot
Copy link
Contributor

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.

@cypress-bot
Copy link
Contributor

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.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Aug 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: performance 🏃‍♀️ Performance related type: regression A bug that didn't appear until a specific Cy version release v7.2.0 🐛 Issue present since 7.2.0
Projects
None yet
2 participants