Reduce Java Object Size with Field Ordering
If you're seeing higher-than-expected memory usage in your Java application, the problem might be your field ordering. Yes - the order of your variables in a class can affect object size, heap usage, and even JVM performance.

If you're seeing higher-than-expected memory usage in your Java application, the problem might be your field ordering.
Yes - the order of your variables in a class can affect object size, heap usage, and even JVM performance.