diff options
author | Michal Schmidt <mschmidt@redhat.com> | 2014-12-09 20:27:26 +0100 |
---|---|---|
committer | Michal Schmidt <mschmidt@redhat.com> | 2014-12-09 21:45:11 +0100 |
commit | f8b5a3b75fb55f0acb85c21424b3893c822742e9 (patch) | |
tree | 46579d628e31c0be4f3d4c9e179afd958a503f0b /src/nspawn/nspawn.c | |
parent | b7c88ab8cc7d55a43450bf3dea750f95f2e910d6 (diff) |
journal: optimize iteration: skip files that cannot improve current candidate entry
Suppose that while iterating we have already looked into a journal file
and got a candidate for the next entry. And we are considering to look
into another journal file because it may contain an entry that is nearer
to the current location than the candidate.
We should skip the whole journal file if we can tell by looking at its
header that none of its entries can precede the candidate.
Before:
$ time ./journalctl --since=2014-06-01 --until=2014-07-01 > /dev/null
real 0m20.518s
user 0m19.989s
sys 0m0.328s
After:
$ time ./journalctl --since=2014-06-01 --until=2014-07-01 > /dev/null
real 0m9.445s
user 0m9.228s
sys 0m0.213s
Diffstat (limited to 'src/nspawn/nspawn.c')
0 files changed, 0 insertions, 0 deletions