Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
https://issues.apache.org/jira/browse/GEODE-6414 was able to reduce the amount of memory consumed by the PdxInstance. Further optimizations can be done by getting rid of some of the extra objects that wrap the byte array owned by the PdxInstance. If the factory is creating an instance that will never deserialize then optimizing the memory usage of the PdxInstance is more likely to be of value.
It seems like an alternative implementation to PdxInstanceImpl could be a class that just has a byte[] reference, an PdxType reference, and an "int" for the hashCode. For some operations you might need to use this information to create a full fledged PdxInstanceImpl at runtime but having the one with the smaller footprint could save around 100 bytes per PdxInstance.