maleck13 / readline

read line module for node js
93 stars 27 forks source link

Ensure the buffer is emptied on event handler errors and that the error is re-emitted #13

Closed dkavassy closed 8 years ago

dkavassy commented 9 years ago

I found that when the event handler for line generated an exception, even though I caught it, the line buffer was not reset and the last line was emitted twice.

dkavassy commented 9 years ago

Thanks for merging the previous PR & releasing it so quickly.

I've added one commit to this, which improved performance in my use case by 25-30% (a 3.5GB file). You may or may not want it as it requires the maximum line length to be specified (it's 4K by default, which should be plenty).

maleck13 commented 9 years ago

@dkavassy thanks for your pull request. Looks ok, but want to make sure I understand the changes before merging. Hope to get to it this weekend.

dkavassy commented 8 years ago

@maleck13 do you think you might be able to have a look at this soon?

maleck13 commented 8 years ago

@dkavassy Thanks you for your work. Sorry it took so long to get back to it.