summaryrefslogtreecommitdiff
path: root/src/journal
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-07-18 14:45:12 +0200
committerLennart Poettering <lennart@poettering.net>2013-07-18 19:55:11 +0200
commit2f5df74a5ec135ab2baebf26af6f088e5b4b8205 (patch)
tree0ddcc1785a5999a8decffc9b9b195d69f52c148d /src/journal
parent9b9b3d36b8ffe5b41c1455bffd44a9d11efc8aee (diff)
downloadsystemd-2f5df74a5ec135ab2baebf26af6f088e5b4b8205.tar.gz
journal: Leave server_dispatch_message early when Storage is none
When using Storage=none there is no point in collecting all the information just to throw them away. After this change journald consumes a lot less CPU time when only forwarding messages.
Diffstat (limited to 'src/journal')
-rw-r--r--src/journal/journald-server.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c
index 332ba41363..81de959666 100644
--- a/src/journal/journald-server.c
+++ b/src/journal/journald-server.c
@@ -845,6 +845,11 @@ void server_dispatch_message(
if (LOG_PRI(priority) > s->max_level_store)
return;
+ /* Stop early in case the information will not be stored
+ * in a journal. */
+ if (s->storage == STORAGE_NONE)
+ return;
+
if (!ucred)
goto finish;