Skip to content

Commit

Permalink
fix: let cellx release its global pendingCells array between benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
jviide committed Sep 20, 2022
1 parent e0a9b0b commit 86a0824
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bench/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ _Adapted from: https://github.com/maverick-js/observables/tree/main/bench_

```bash
npm i
env NODE_OPTIONS="--max-old-space-size=8096" npm start
```
npm start
```
3 changes: 3 additions & 0 deletions bench/layers.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ async function main() {
}
runs.push(await start(current.fn, layers))
}
// Allow libraries that free resources asynchronously (e.g. cellx) do so.
await new Promise((resolve) => setTimeout(resolve, 0));

if(typeof result !== 'number') {
current.runs[i] = result
} else {
Expand Down

0 comments on commit 86a0824

Please sign in to comment.