Seven is a magic number.
This commit is contained in:
parent
f269690b3e
commit
c07d39a11f
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user