I need to draw a line that moves from left to right over the screen. Currently I'm just calling .clearRect() everytime, and draw it again, 1 pixel further. However, another possibility would be to draw the canvas once, and move it's CSS position across the screen.
Which scenario would be preferred for performance and why?