andywer / andywer/leakage

Extremely low performance on node.js 11

Open
#32 3 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
1.6k
Forks
36
PR merge metrics
No merged PRs in 30d

Description

Leakage is incredibly slow on my system (with an Intel(R) Core(TM) i7-3610QM CPU).

Take the following minimal example:
```
$ cat leakage.js
const sinon = require('sinon');
const leakage = require('leakage');

it(`test`, function(){
this.timeout( 1000000 );
leakage.iterate( ()=>{} );
});

$ npx mocha leakage.js
(node:7249) ExperimentalWarning: queueMicrotask() is experimental.
✓ test (26544ms)

1 passing (27s)
```

The test time decreases from 26s to ~4.6s if I avoid including sinon. In my real tests, where I require a bunch of other modules besides sinon, testing a no-op function for leaks takes minutes.

Is this the expected behavior?
I don't think so, unless it's due to recent fixes for the latest v8, since several issues mention a suggested timeout of 5000ms.

I'm running node v11.10.0 and mocha 5.2.0 on a Linux 4.20.7 system.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.