c28a28e69e
The current code when applying negative operator on an expression used recursion which in extreme case is not best friend with python. e.g: on instance with a lot of wharehouse, some simple action could lead to a domain with lot of elements which could easiliy go over the python maximum recursion limit. This commit fixes this by replacing recursion with iteration. We have a stack of negation flags and loop on each token of the domain as follow : - when we iterate on a leaf, it consumes the top negation flag, - after a '!' operator, the top token negation is inversed, - after an '&' or '|' operator, the top negation flag is duplicated on the top of the stack. closes #9433 opw-653802 |
||
---|---|---|
.. | ||
__init__.py | ||
expression.py | ||
fields.py | ||
orm.py | ||
osv.py | ||
query.py |