From 56bc9fdb1c215819f4d47d62f23aa99350f41d30 Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Fri, 26 May 2017 14:07:43 +0200 Subject: [PATCH] better performance with slave --- tiramisu/option/masterslave.py | 2 +- tiramisu/value.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/tiramisu/option/masterslave.py b/tiramisu/option/masterslave.py index 847d644..b0f6b46 100644 --- a/tiramisu/option/masterslave.py +++ b/tiramisu/option/masterslave.py @@ -229,7 +229,7 @@ class MasterSlaves(object): else: return value elif index is None: - multi.append(value, setitem=False, force=True, validate=validate, + multi.append(value, setitem=False, force=True, validate=False, force_permissive=force_permissive) else: multi = value diff --git a/tiramisu/value.py b/tiramisu/value.py index 8406071..f8b516d 100644 --- a/tiramisu/value.py +++ b/tiramisu/value.py @@ -770,8 +770,7 @@ class Multi(list): if 'validator' in setting_properties and validate: session = context.cfgimpl_get_values()._p_.getsession() fake_context = context._gen_fake_values(session) - fake_multi = fake_context.cfgimpl_get_values()._get_cached_value( - self.opt, path=self.path, validate=False) + fake_multi = Multi(list(self), weakref.ref(fake_context), self.opt, self.path) fake_multi._setitem(index, value, validate=False) self._validate(value, fake_context, index, True) #assume not checking mandatory property