chiark / gitweb /
journal: optimize iteration by skipping exhausted files
authorMichal Schmidt <mschmidt@redhat.com>
Thu, 18 Dec 2014 13:21:55 +0000 (14:21 +0100)
committerMichal Schmidt <mschmidt@redhat.com>
Thu, 18 Dec 2014 13:29:46 +0000 (14:29 +0100)
commit6e693b42dcb0b332364b0414107826826925c49f
tree9a518765de829bafb6197f3af15ba4b1e6e605a3
parent58439db4cc45a6f84a74ad73f873bd3c113eebf6
journal: optimize iteration by skipping exhausted files

If from a previous iteration we know we are at the end of a journal
file, don't bother looking into the file again. This is complicated by
the fact that the EOF does not have to be permanent (think of
"journalctl -f"). So we also check if the number of entries in the
journal file changed.

This optimization has a similar effect as "journal: optimize iteration:
skip whole files behind current location" had.
src/journal/journal-file.h
src/journal/sd-journal.c