not jet,busy lately with other things, but, replace in your code:
for( var i=0; i<lineLength; i++ )
for( var i=0; i<lineLength; i=i+10 )
click, wave with mouse around, you will se 'big' difference.
If there are several lines to be drawn at same time, that exponentialy slows things down