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.

Performance Regression in 3.x

See original GitHub issue

Current behavior:

Running 13 spec files in cypress@3.0.1 takes 152 seconds (including test compilation and execution)

Desired behavior:

Running 13 spec files in cypress@2.1 takes 79 seconds (including test compilation and execution)

Steps to reproduce:

My guess is that this regression is related to Cypress now running tests in isolation. There appears to be a lot of setup and teardown time between specs running. Is there anyway around this? Cypress taking twice as long to run the same test suite is surprising.

I’m not sure I can justify upgrading to 3.0 with this issue. It at least will make me think long and hard whether I can justify adding another test when it will be a significant impact to my CI run times.

UPDATE: My tests currently do an afterEach(() => { cy.screenshot() }) removing this cuts down execution time to 110 seconds.

Versions

cypress@3.0.1

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
chrisloprestocommented, Sep 24, 2018

We’re seeing a similar performance regression from Cypress 2.1 to Cypress 3.1:

  • 72 spec files
  • Representative Cypress 2.1 run: 317 seconds
  • Representative Cypress 3.1 run (no parallelization): 670 seconds

This would indicate a thoroughly unscientific, approximate ~5 second penalty per spec file. 🙂

With Cypress 3’s built-in parallelization (6 workers appears to be our sweet spot), we can improve the time of the overall test suite run to 96 seconds, so that’s fantastic. For better or worse that shifts our conversation to evaluating among a few options:

  • Hold steady on Cypress 2
  • Combine tests into fewer files. Presumably help unparallelized build time on free plan, hurt parallelized build time on paid plan.
  • Upgrade to paid plan to use Cypress 3’s built-in parallelization
  • Use our own parallelization scheme on Cypress 3 free plan

We’re happy to provide diagnostics and help dig in for troubleshooting as well. Cheers!

0reactions
jennifer-shehanecommented, Jun 4, 2020

@tomitrescak No there isn’t a flag. The browser relaunches in between each spec file so there is not any discrepancy between how runs run when parallelizaed (which would have each specfile in isolation completely) versus not.

Read more comments on GitHub >

github_iconTop Results From Across the Web

3x performance regression from Swift 4.2 to 5 — help needed
I am encountering an ~3-4x performance regression when switching from Swift 4.2 to Swift 5. Here is an Instruments trace from Swift 4.2:...
Read more >
Performance regression in Chart.js 3.x vs. 2.x #10073 - GitHub
I've been maintaining it since March 2020, and at the beginning the charts worked fine since there wasn't much data to show, but...
Read more >
Assessment of Regression Models Performance • performance
Test if your model is a good model! A crucial aspect when building regression models is to evaluate the quality of modelfit. It...
Read more >
3 Best metrics to evaluate Regression Model? | by Songhao Wu
MSE, RMSE, or MAE are better be used to compare performance between different regression models. Personally, I would prefer using RMSE and I ......
Read more >
Perphecy: Performance Regression Test Selection Made ...
Abstract—Developers of performance sensitive production soft- ware are in a dilemma: performance regression tests are too costly to run at each commit, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

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