I have code like following in node process:
setInterval(function updateRealtimeDataFromJsh() {
console.time("update");
<SOME synchronous JS execution>
console.timeEnd("update");
}, 1000);
Is it possible that time take by "update" can vary a lot i.e is it possible that sometime same js code is taking 10ms and some time it is taking 500ms, my understanding is that if node is able to execute this code it means main thread is free and every time it should take almost same time but it doesn't seem to be true, does anyone has any idea about this?
via user999491
No comments:
Post a Comment