diff options
author | Christian Hesse <mail@eworm.de> | 2023-01-20 11:15:55 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2023-01-20 11:26:53 +0100 |
commit | 072d34947321fff4afa4e7df059874c3523eaccd (patch) | |
tree | efe69b59d2ffb3edee640485dad3dec108a15194 /log-forward | |
parent | 2294ac77a8a69b1962e06264ae0f4c250e5365ff (diff) |
log-forward: cache the result of $LogForwardFilterLogForwarding
Looks like the function is called for every message to match otherwise. 😳
Diffstat (limited to 'log-forward')
-rw-r--r-- | log-forward | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/log-forward b/log-forward index 73620e8..96cb257 100644 --- a/log-forward +++ b/log-forward @@ -47,8 +47,9 @@ $ScriptLock $0; :local MessageVal; :local MessageDups ({}); +:local LogForwardFilterLogForwardingCached [ $EitherOr [ $LogForwardFilterLogForwarding ] ("\$^") ]; :foreach Message in=[ /log/find where (!(message="") and \ - !(message~[ $EitherOr [ $LogForwardFilterLogForwarding ] ("\$^") ]) and \ + !(message~$LogForwardFilterLogForwardingCached) and \ !(topics~$LogForwardFilter) and !(message~$LogForwardFilterMessage)) or \ topics~$LogForwardInclude or message~$LogForwardIncludeMessage ] do={ :set MessageVal [ /log/get $Message ]; |