]> git.ipfire.org Git - thirdparty/systemd.git/commit - docs/JOURNAL_FILE_FORMAT.md
journal: Store offsets to tail entry array objects in chain
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 21 Jan 2022 18:29:41 +0000 (18:29 +0000)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 7 Oct 2022 10:28:09 +0000 (12:28 +0200)
commite81710d3d08886f8957bdbdb6746017ff0538818
tree0f72eabea0a31b08e444b8b0b62c5152421147ba
parent0e35afff1db475b46281fac75fa3fc2d7f26cae7
journal: Store offsets to tail entry array objects in chain

Previously, we'd iterate an entry array from start to end every time
we added an entry offset to it. To speed up this operation, we cache
the last entry array in the chain and how many items it contains.
This allows the addition of an entry to the chain to be done in
constant time instead of linear time as we don't have to iterate
the entire chain anymore every time we add an entry.
docs/JOURNAL_FILE_FORMAT.md
src/libsystemd/sd-journal/journal-authenticate.c
src/libsystemd/sd-journal/journal-def.h
src/libsystemd/sd-journal/journal-file.c
src/libsystemd/sd-journal/journal-file.h
src/libsystemd/sd-journal/journal-verify.c