Skip to content

Logging of tasks makes runner unbearably slow #105

Closed
@badeball

Description

@badeball

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 })
         })
     }
 

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions