You can measure how memory is used to create the object and test. Also you have to test multiple objects just as you would have in a real application.
--
You received this message because you are subscribed to the Google Groups "mechanical-sympathy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mechanical-symp...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Btw wrappers vs primitives can be a factor of ~3x larger/slower but the key problem is making a field nullable for no good reason.
Can you show the test you have? Much depends on exactly what you are doing.
Once you use higher value Boxed Numbers (no VM cache) and keep your Pojo's permanently (OldSpace), the impact on application performance will worsen. Additionally you get poor localilty as the Boxed Integers are located at a different location than the container pojo. This gets worse by the time, worst case Integer's referenced by your pojo are cluttered all across the heap. This gets even worse if you use Non-Compacting Collectors such as CMS.
FullGC duration is a direct function of number of Objects (and locality).I've charted this here
Am Montag, 7. Oktober 2013 21:45:11 UTC+2 schrieb Eugene Morozov:
--
To unsubscribe from this group and stop receiving emails from it, send an email to mechanical-sympathy+unsub...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to mechanical-symp...@googlegroups.com.