https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=165471
Kyle Evans <bsdpo...@kyle-evans.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bsdpo...@kyle-evans.net --- Comment #4 from Kyle Evans <bsdpo...@kyle-evans.net> --- Created attachment 179123 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=179123&action=edit Proposed patch to address issues with bsdgrep --mmap As pointed out by Mateusz, bsdgrep --mmap does not handle EOF properly when the file does not end with a newline. I still don't get quite the performance in /usr/local/share that the original reporter does, but bsdgrep is now actually responsive in /usr/local/share. I'm attaching a patch that reworks bits of the loop in grep_fgetln to return the rest of the line and ensure that we still advance the buffer by the length of the rest of the line. This improves both the original scenario as well as Mateusz's more trivial test case. -- You are receiving this mail because: You are the assignee for the bug. _______________________________________________ freebsd-bugs@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"