From 6e693b42dcb0b332364b0414107826826925c49f Mon Sep 17 00:00:00 2001 From: Michal Schmidt Date: Thu, 18 Dec 2014 14:21:55 +0100 Subject: 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 | 1 + 1 file changed, 1 insertion(+) (limited to 'src/journal/journal-file.h') diff --git a/src/journal/journal-file.h b/src/journal/journal-file.h index 8084176195..561982fe39 100644 --- a/src/journal/journal-file.h +++ b/src/journal/journal-file.h @@ -78,6 +78,7 @@ typedef struct JournalFile { direction_t last_direction; LocationType location_type; + uint64_t last_n_entries; char *path; struct stat last_stat; -- cgit v1.2.3-54-g00ecf