Why
As Manticore users, we want Manticore to use RAM as efficiently as possible. One can minimize the amount of memory a Python object uses by using the __slots__ property. Since the expressions system involves the creation of thousands of nested Python objects, using __slots__ here would provide noticeable memory usage improvements.
Acceptance Criteria
All subclasses of Expression use the __slots__ property
Dev Notes
We added limited support for this in #1635, but found out that subclasses of slotted classes need to also have __slots__ explicitly defined, so this implementation is not complete.
Why
As Manticore users, we want Manticore to use RAM as efficiently as possible. One can minimize the amount of memory a Python object uses by using the
__slots__property. Since the expressions system involves the creation of thousands of nested Python objects, using__slots__here would provide noticeable memory usage improvements.Acceptance Criteria
All subclasses of
Expressionuse the__slots__propertyDev Notes
We added limited support for this in #1635, but found out that subclasses of slotted classes need to also have
__slots__explicitly defined, so this implementation is not complete.