1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-24 14:50:17 +03:00

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.
This commit is contained in:
Holger Hans Peter Freyther 2013-07-18 14:45:12 +02:00 committed by Lennart Poettering
parent 9b9b3d36b8
commit 2f5df74a5e

View File

@ -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;