Forums Register Login

performance issue while creating object

+Pie Number of slices to send: Send
I want to populate tranfer object i.e value object in DAO.
I can do it two ways ,through constructor ,or through setter method.
In Performance and memory use wise which is better approach in populating value object,using construtor or using setter method.
Thanks In advance
+Pie Number of slices to send: Send
any one have any idea on it
+Pie Number of slices to send: Send
Any difference is likely to be trivial, small enough to ignore. But if you needed to create a million objects in a nanosecond, and every bytecode counted, I'd go with the constructor, as you'd be able to avoid making a whole bunch of extra method calls.
Climb the rope! CLIMB THE ROPE! You too tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 694 times.
Similar Threads
Value object populating question
Struts 2 newbie confused by value stack
Extracting sub-elements from a List
Map with html:optionCollection
For the authors--What is Spring??
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 10:01:10.