Move the AutoScroll function to an animation frame to prevent layout thrashing and to keep it in sync with fastForEach Remove the <br> tag from the terminal and use display: block; on span tags to prevent increasing DOM nodes and faster processing of the terminal