-
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
experimentalSourceRewriting performance issue #7565
Comments
There does appear to be ~1000ms increase in the test time for visiting this specific URL when
Cypress.on('test:after:run', (attributes) => {
console.log('Test "%s" has finished in %dms', attributes.title, attributes.duration)
})
describe("Testing", () => {
Array(15).fill(0).forEach((val, i) => {
it(`test ${i}`, () => {
cy.visit('https://example.cypress.io')
})
})
}) With
|
I am experiencing a similar Issue, a little worse,
Now I am trying to set Is there a way to set Single test configuration for a specific cucumber Scenario? (Setting 'experimentalSourceRewriting',true in this case) |
In case it helps anyone, the workaround I found for Cucumber Tests was Tagging that specific Scenario with something like @experimental and then use the command line to run only that Scenario with that configuration:
And for all my other tests (cypress.json has For normal Cypress mocha tests I guess they could pass the single test Configuration like this? (Haven't tried it) My workaound however gives me a new Issue as the cucumberJSON report generation only creates one report per feature file, and as far as I know still has no timestamp option, hence I only get one report out of my 2 executions of that feature and I need cucumberJSON format for my CI/CD cloud integration with JiraXray |
Issue 8128 is similar and has a workaround that may be worth referencing here. |
This issue has not had any activity in 180 days. Cypress evolves quickly and the reported behavior should be tested on the latest version of Cypress to verify the behavior is still occurring. It will be closed in 14 days if no updates are provided. |
This issue has been closed due to inactivity. |
Coming from #29438, I dug into it with a profiler and found my case to be primarily due to cloning the AST in Even with that addressed—I want have to look into it further to better understand why this makes such a difference here—there's more room for improvement, where reusing the original JS instead of printing a potentially unmodified AST is super wasteful. Potential saving of ~1.8s, bringing the total down to 3.2s for the file I was seeing 100s+ rewrite times for. Still not great and room for improvement, but getting somewhere. Update: after some more optimizations, we're down to ~1.3s. Mostly in an experimental state still. |
@JoostK It'd be helpful, if possible, to get those optimizations back in as a PR to update this logic. |
@jennifer-shehane yeah definitely, I will have to carve out some more time for it though. Hopefully somewhere this month. |
Okay, I have two PRs out:
|
Current behavior:
After enabling
experimentalSourceRewriting
, a singleVISIT
takes about 5-10 times as long. An unacceptable increase for our pipelines. HTTP requests toGET
the page's resources seems to be significantly slower.Desired behavior:
We want the HTTP requests to be as performant as without
experimentalSourceRewriting
.Test code to reproduce
I created this very simple PR: cypress-io/cypress-test-tiny#59
Please try to disable/re-enable
experimentalSourceRewriting
.Have a look at the difference in time that the following test takes:
if
experimentalSourceRewriting: true
it takes ~1583msif
experimentalSourceRewriting: false
it takes ~300msVersions
Cypress 4.6.0
The text was updated successfully, but these errors were encountered: