better performance with slave
This commit is contained in:
parent
026179d9b7
commit
56bc9fdb1c
|
@ -229,7 +229,7 @@ class MasterSlaves(object):
|
||||||
else:
|
else:
|
||||||
return value
|
return value
|
||||||
elif index is None:
|
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)
|
force_permissive=force_permissive)
|
||||||
else:
|
else:
|
||||||
multi = value
|
multi = value
|
||||||
|
|
|
@ -770,8 +770,7 @@ class Multi(list):
|
||||||
if 'validator' in setting_properties and validate:
|
if 'validator' in setting_properties and validate:
|
||||||
session = context.cfgimpl_get_values()._p_.getsession()
|
session = context.cfgimpl_get_values()._p_.getsession()
|
||||||
fake_context = context._gen_fake_values(session)
|
fake_context = context._gen_fake_values(session)
|
||||||
fake_multi = fake_context.cfgimpl_get_values()._get_cached_value(
|
fake_multi = Multi(list(self), weakref.ref(fake_context), self.opt, self.path)
|
||||||
self.opt, path=self.path, validate=False)
|
|
||||||
fake_multi._setitem(index, value, validate=False)
|
fake_multi._setitem(index, value, validate=False)
|
||||||
self._validate(value, fake_context, index, True)
|
self._validate(value, fake_context, index, True)
|
||||||
#assume not checking mandatory property
|
#assume not checking mandatory property
|
||||||
|
|
Loading…
Reference in New Issue