Line drawing slowdowns on OS X

Drawing lines seems to have a performance issue on OS X: Most of the time, this is perfectly fine, but sometimes, rendering performance kneels to a halt at 10fps.