From 6c931975dea4b05ad87b712fe45a486fef3b107a Mon Sep 17 00:00:00 2001 From: Dimitri Fontaine Date: Sat, 17 Jun 2017 17:55:03 +0200 Subject: [PATCH] Refrain from pushing too much logging trafic. In this patch we hard-code some cases when we know the log message won't be displayed anywhere so as to avoid sending it to the monitor thread. It certainly is a modularity violation, but given the performance impact... --- src/utils/monitor.lisp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/utils/monitor.lisp b/src/utils/monitor.lisp index 619dcc2..ff89e9f 100644 --- a/src/utils/monitor.lisp +++ b/src/utils/monitor.lisp @@ -36,9 +36,10 @@ (defun log-message (category description &rest arguments) "Send given message into our monitoring queue for processing." - (send-event (make-log-message :category category - :description description - :arguments arguments))) + (when (cl-log::category-messengers category) + (send-event (make-log-message :category category + :description description + :arguments arguments)))) (defun new-label (section label &optional dbname) "Send an event to create a new LABEL for registering a shared state under