Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Error in async mode and strange benchmark test #18

Meettya opened this Issue · 2 comments

2 participants


For some reason I write my own require.resolve() implementation and use yours and some other for benchmarking.

So, today I saw async mode in node-resolve and add it to test suite. And its sometime works, and sometime not.

See yourself - add Meettya@04d85e5

npm install node-bench -g
npm install lodash

and run test from root dir (may uncomment assert in async to get error)
node-bench ./bench/async-resolve_vs_other.js

and even more - if node-bench right - in my tests sync mode faster than async - its strange.


No, it's not. Don't forget about fs cache on nix*. Also async code requires some several ctx switches (when going into additional callbacks made for it). So in async mode there are more to switch and call. More ticks. Longer time execution. Even if there's no cache inside this module. So there is no wonder ;-D Thanks for benchmarks! You can try it to use your bench with nfs or samba without cache.


nb: Need to fix this error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.