further optimisations to drawLines, 2% profiler improvement