(By heavy I meant objects with several lines)
Hi, I got this doubt, I got a class EntityVO, and is getting quite big lately, 250+ lines, however are mostly private variables with getters and setters.
My doubt is, iterating through them, would consume more time because of the size of the class rather than if I iterate through a lightweight class?
Thanks.
No. The number of fields in a class does not affect performance of the class in any way (other than when you create the class).
When you iterate through an array of classes, you are really just throwing around a reference to the actual instance, not all the data stored in it.