summaryrefslogtreecommitdiff
path: root/addons/analytic_user_function
diff options
context:
space:
mode:
authorRaphael Collet <rco@openerp.com>2015-03-11 12:37:10 +0100
committerRaphael Collet <rco@openerp.com>2015-03-23 14:36:15 +0100
commite7928e1265b1d3bb0d937c0e3adcaf21185560cf (patch)
treeeffad853f58cea21770435eb3412c43e9c04b39f /addons/analytic_user_function
parent915af86a915f44c4405509c27a0526bed64fc943 (diff)
[IMP] fields: add `__slots__` on all fields
Introduce slots on all field classes for common attributes; slots take much less memory than a `__dict__`. The other attributes are stored in a dictionary `_attrs`; all fields with an empty value for `_attrs` (common case) share the same empty dictionary. This saves quite some memory (around 4.5Mb per registry), given the number of field instances created for a registry. Another mechanism is used for the default values of attributes, since slots cannot be assigned on classes.
Diffstat (limited to 'addons/analytic_user_function')
0 files changed, 0 insertions, 0 deletions