Skip to content
This repository has been archived by the owner on Aug 24, 2021. It is now read-only.

use process.nextTick instead of setImmediate #35

Merged
merged 1 commit into from
Jan 8, 2019

Conversation

mcollina
Copy link
Contributor

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.

@ghost ghost assigned mcollina Dec 20, 2018
@ghost ghost added the status/in-progress In progress label Dec 20, 2018
@hugomrdias hugomrdias merged commit 343a6c0 into master Jan 8, 2019
@ghost ghost removed the status/in-progress In progress label Jan 8, 2019
@hugomrdias hugomrdias deleted the from-set-immediate-to-next-tick branch January 8, 2019 15:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants