This repository has been archived by the owner on Aug 24, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: use process.nextTick instead of setImmediate (#35)
I have see this specific setImmediate to cause unneeded latency in https://upload.clinicjs.org/public/1c86eeec6c2c4ee47e0d26d06cec62ee1fe74c745c610d5ba0a11bbe985649aa/31518.clinic-bubbleprof.html. This happens because other I/O activity happens between the hashing is completed and callback is executed. This change also removes the closure, having the added benefit of allowing `input` to be garbage collected if possible reducing memory pressure.