-
Improvement
-
Resolution: Done
-
Highest
-
None
We are currently mapping individual 'bits' components to a Boolean:
public class Foo implements TypeObject, Serializable { private static final long serialVersionUID = -339486881606097888L; private final Boolean _one; private final Boolean _bar; // ... public Boolean getOne() { return _one; } public Boolean getBar() { return _bar; }
The storage requirements here are an object reference and the implied nullability, exposed to users, just does not make any sense. Fix the code generator to emit simple 'boolean' properties here:
public class Foo implements TypeObject, Serializable { private static final long serialVersionUID = -339486881606097888L; private final boolean _one; private final boolean _bar; // ... public boolean getOne() { return _one; } public boolean getBar() { return _bar; }
This will drop storage requirements by 4x (32bit/compressed oops JVM) or 8x (64bit JVM).
As part of this change, we also need to simplify the toString() method, so that it just lists those bits which are set and not all lists with their false/true values.
- blocks
-
MDSAL-746 Improve BitsTypeObject storage
- Confirmed