-
-
Notifications
You must be signed in to change notification settings - Fork 52
Avoid isFnAsyncResource calling task functions #370
Copy link
Copy link
Closed
Description
I upgraded TinyBench from v3 to v5 and noticed a slowdown in initialization.
After debugging, I discovered that isFnAsyncResource calls the bench function to check if it's an asynchronous task.
It would be great if this function execution could be avoided by default or if there was an option to avoid it.
at fn (file:///F:/babel/benchmark/util.mjs:139:15)
at isFnAsyncResource (file:///F:/babel/node_modules/tinybench/dist/index.js:1:27858)
at new Task (file:///F:/babel/node_modules/tinybench/dist/index.js:1:29292)
at Bench.add (file:///F:/babel/node_modules/tinybench/dist/index.js:1:35860)
at Benchmark.add (file:///F:/babel/benchmark/util.mjs:106:16)
at Timeout._onTimeout (file:///F:/babel/benchmark/util.mjs:172:13)
at listOnTimeout (node:internal/timers:608:17)
at process.processTimers (node:internal/timers:543:7)
Thanks for this amazing project!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels