Make 'make test' factors faster.
Profiling with firebug reveals that log and checkScrolling functions slow down the 'make test' by factors. Use insertAdjacentHtml in the log fucntion insteand of appending to innerHTML. Also call checkScrolling function only when it is prudent to do instead of unnecessarily in every log function call.
This commit is contained in:
parent
73bb09bdad
commit
3fa8bba48e
@ -221,6 +221,8 @@ function checkScrolling() {
|
||||
}
|
||||
|
||||
function log(str) {
|
||||
stdout.innerHTML += str;
|
||||
checkScrolling();
|
||||
stdout.insertAdjacentHTML("BeforeEnd", str);
|
||||
|
||||
if (str.charAt(str.length - 1) == '\n')
|
||||
checkScrolling();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user