The implementation liberally uses getline to ultimately copy and re-scan the input 3+ times. This was seen to be slow in a case where resources were embedded into the pipeline via a Buffer. It also filters lines too late; it should do so during the initial copy.