Seven is a magic number.

This commit is contained in:
Zixaphir 2013-04-25 02:23:32 -07:00
parent f269690b3e
commit c07d39a11f
4 changed files with 19 additions and 4 deletions

View File

@ -9671,7 +9671,11 @@
func = task[0];
args = Array.prototype.slice.call(task, 1);
func.apply(func, args);
return setTimeout(softTask, 0);
if ((queue.length % 7) === 0) {
return setTimeout(softTask, 0);
} else {
return softTask();
}
};
len = nodes.length;
i = 0;

View File

@ -9694,7 +9694,11 @@
func = task[0];
args = Array.prototype.slice.call(task, 1);
func.apply(func, args);
return setTimeout(softTask, 0);
if ((queue.length % 7) === 0) {
return setTimeout(softTask, 0);
} else {
return softTask();
}
};
len = nodes.length;
i = 0;

View File

@ -9537,7 +9537,11 @@
func = task[0];
args = Array.prototype.slice.call(task, 1);
func.apply(func, args);
return setTimeout(softTask, 0);
if ((queue.length % 7) === 0) {
return setTimeout(softTask, 0);
} else {
return softTask();
}
};
len = nodes.length;
i = 0;

View File

@ -228,7 +228,10 @@ Main =
func = task[0]
args = Array::slice.call task, 1
func.apply func, args
setTimeout softTask, 0
if (queue.length % 7) is 0
setTimeout softTask, 0
else
softTask()
# get the nodes' length only once
len = nodes.length