Skip to content

Logging of tasks makes runner unbearably slow #105

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

Closed
badeball opened this issue Dec 9, 2019 · 2 comments
Closed

Logging of tasks makes runner unbearably slow #105

badeball opened this issue Dec 9, 2019 · 2 comments
Assignees
Labels

Comments

@badeball
Copy link

badeball commented Dec 9, 2019

Everytime code coverage is sent back to the node process (?), the stringified object is logged with its arguments, ref. https://github.com/cypress-io/code-coverage/blob/v1.10.2/support.js#L26. In my case, this is a 16839123-character long string and the rendering of this makes the runner unbearably slow.

Now, I realize that logging is a desired side-effect - maybe the logger itself should be able to cut obscenely large arguments?

In the meanwhile, I'm using patch-package with the following patch.

diff --git a/node_modules/@cypress/code-coverage/support.js b/node_modules/@cypress/code-coverage/support.js
index 55b1e29..96ea722 100644
--- a/node_modules/@cypress/code-coverage/support.js
+++ b/node_modules/@cypress/code-coverage/support.js
@@ -23,7 +23,7 @@ if (Cypress.env('coverage') === false) {
       const applicationSourceCoverage = win.__coverage__
 
       if (applicationSourceCoverage) {
-        cy.task('combineCoverage', JSON.stringify(applicationSourceCoverage))
+        cy.task('combineCoverage', JSON.stringify(applicationSourceCoverage), { log: false })
       }
     })
   })
@@ -54,7 +54,7 @@ if (Cypress.env('coverage') === false) {
             // original failed request
             return
           }
-          cy.task('combineCoverage', JSON.stringify(coverage))
+          cy.task('combineCoverage', JSON.stringify(coverage), { log: false })
         })
     }
 
@bahmutov bahmutov self-assigned this Dec 9, 2019
@bahmutov
Copy link
Contributor

bahmutov commented Dec 9, 2019

yeah, we can probably save logging time there

@bahmutov
Copy link
Contributor

bahmutov commented Dec 9, 2019

🎉 This issue has been resolved in version 1.10.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants