-
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
Snapshotting still occurs when numTestsKeptInMemory is 0 #4104
Comments
Hey @CoryDanielson, can you take a look at your resolved configuration and confirm that the |
@jennifer-shehane I updated the original post with new screenshots. |
I opened up a PR to address this #4123 I extended the if statement to include a check for snapshot: (name, options = {}) ->
## bail early and dont snapshot
## if we're in headless mode
## TODO: fix this
if not config("isInteractive") || _.toString(config("numTestsKeptInMemory")) is '0'
return @ |
I'll take this PR from here and we'll get it out in the next patch release or so. |
The code for this is done in cypress-io/cypress#4406, but has yet to be released. |
Released in |
Current behavior:
When running cypress in GUI mode with
numTestsKeptInMemory
set to0
, snapshotting still occurs even though none of them should be kept in memory. This has a negative impact on performance and memory consumption.In this screenshot, you can see that
numTestsKeptInMemory
is0
, but 5 seconds is spent taking snapshots that will not be used.In this screenshot you can see where the majority of the snapshot execution took place, 3.4s converting rules from large stylesheets into a string, and 0.4s replacing URLs in those strings with absolute paths.
Desired behavior:
When running with
numTestsKeptInMemory
set to0
, snapshotting should be avoided in the same way that occurs while running in headless mode.Steps to reproduce:
numTestsKeptInMemory
to0
.Versions
Cypress: 3.2.0
Chrome: Chrome 74
The text was updated successfully, but these errors were encountered: