|nsMsgLineStreamBuffer::ReadNextLine| works as follows. 1) The existing buffer is searched for the EOL character, if it is found, the line is returned. 2) Otherwise, more data is read into the buffer, and 3) the *whole* buffer is searched for the EOL character, see http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/mailnews/base/util/nsMsgLineBuffer.cpp&rev=1.39&root=/cvsroot&mark=348,419#398 In step 3), it would be sufficient to only search the data which was just read in.
Created attachment 200007 [details] [diff] [review] Search EOL in buffer only once (also makes the code somewhat easier to read by eliminating the variable |endBufPos|)
Comment on attachment 200007 [details] [diff] [review] Search EOL in buffer only once I'll test this and drive it in, thx, Hans.
fixed, Thx, Hans-Andreas.
verified through lxr