Skip to content

Commit

Permalink
process: relocate needSpinner calls
Browse files Browse the repository at this point in the history
It's only necessary to request the spinner once tickDone has been
called, and not on every nextTick.
  • Loading branch information
trevnorris committed May 30, 2013
1 parent 49e3fcd commit 5b636fe
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions src/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -355,12 +355,12 @@
} else {
nextTickQueue.splice(0, infoBox[index]);
infoBox[length] = nextTickQueue.length;
if (needSpinner) {
_needTickCallback();
needSpinner = false;
}
}
}
if (needSpinner) {
_needTickCallback();
needSpinner = false;
}
inTick = false;
infoBox[index] = 0;
infoBox[depth] = tickDepth_;
Expand Down Expand Up @@ -483,11 +483,6 @@

nextTickQueue.push(obj);
infoBox[length]++;

if (needSpinner) {
_needTickCallback();
needSpinner = false;
}
}

function _nextDomainTick(callback) {
Expand All @@ -501,11 +496,6 @@

nextTickQueue.push(obj);
infoBox[length]++;

if (needSpinner) {
_needTickCallback();
needSpinner = false;
}
}
};

Expand Down

0 comments on commit 5b636fe

Please sign in to comment.