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.