keyfile: fill parse buffer in line sized chunks
authorJohn Lindgren <john.lindgren@tds.net>
Tue, 17 May 2011 03:03:30 +0000 (23:03 -0400)
committerRay Strode <rstrode@redhat.com>
Tue, 17 May 2011 03:41:55 +0000 (23:41 -0400)
commitaeac5de2f8eeaadcdc7e021694d92470834fece8
tree7b77630d286d52115f0289f6b1d69dd4eba8e5eb
parent9c1a44cf32ebeee00a0e2303832b9cea26c93b76
keyfile: fill parse buffer in line sized chunks

When loading a keyfile the incoming bytes are fed
to a line buffer to get parsed each time a new line
is encountered.

The code that fills the line buffer does it inefficiently,
one byte at a time.

This commit changes that code to look ahead at the incoming
bytes for the next '\n' character and then fill the line buffer
all at once.

https://bugzilla.gnome.org/show_bug.cgi?id=650211
glib/gkeyfile.c