]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Do not store serialized ANN
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 9 Jul 2019 16:46:34 +0000 (17:46 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 9 Jul 2019 16:46:34 +0000 (17:46 +0100)
src/plugins/lua/neural.lua

index 815e1ddf06f20db2329514105a667dc6b37ebb9d..b88890c24933eafff2cd97c7221571e8bf087fe4 100644 (file)
@@ -789,7 +789,6 @@ local function load_new_ann(rule, ev_base, set, profile, min_diff)
 
           if ann then
             set.ann = {
-              ann = ann,
               version = profile.version,
               symbols = profile.symbols,
               distance = min_diff,
@@ -798,6 +797,7 @@ local function load_new_ann(rule, ev_base, set, profile, min_diff)
 
             local ucl = require "ucl"
             local profile_serialized = ucl.to_format(profile, 'json-compact', true)
+            profile.ann = ann -- To avoid serialization
 
             local function rank_cb(_, _)
               -- TODO: maybe add some logging