Closed
Description
After upgrade from 5.2.x to 5.3.x, we observed large increase in YoungGC caused by huge amount of object created. After test we found that is because BeanUtils.copyProperties().
In 5.3.x, using ResolvableType to increase fitness but there is no cache which would cause there are many ResolvableType objects created and result in large memory consuming. And there is a comparasion:
TestBean testBean1 = new TestBean("1", "2", "3", "4", "5", "6", "7", "8", "1", "2", "3", "4", "5", "6", "7", "8");
TestBean testBean2 = new TestBean();
for (int i = 0; i > -1; i++) {
BeanUtils.copyProperties(testBean1, testBean2);
System.out.println(i);
}
the VM option is -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC -Xmx512m
, the program will exit when the memory run out.
For 5.2.x, the last i is:
444489
For 5.3.x, the last i is:
27456
That's a huge memory consuming.