summaryrefslogtreecommitdiff
path: root/addons/analytic_user_function/analytic_user_function.py
diff options
context:
space:
mode:
authorRaphael Collet <rco@openerp.com>2015-11-05 09:18:48 +0100
committerNicolas Lempereur <nle@odoo.com>2015-11-05 17:13:28 +0100
commitc28a28e69eb9a39a5acfcd1247d87f5bccaca7f3 (patch)
treed36b8118c54a63dcded1e30b672dc3336b7eed34 /addons/analytic_user_function/analytic_user_function.py
parenta23468c845425f3187c9c76dd2200fb9a1c9f3ab (diff)
[IMP] osv: use iteration for expression negating
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
Diffstat (limited to 'addons/analytic_user_function/analytic_user_function.py')
0 files changed, 0 insertions, 0 deletions