Only application performance over time... lazy load decreases startup  
time but slows down application execution.

Turning lazy load off might slow down response time for the first  
request of a TransferObject instance but increases application  
performance after that by having prefetched all the data for that  
object and it's friends and family. You see more trips to the DB, so  
more network traffic and more DB log entries, when you do lazy  
loading. In general, I prefer to shut lazy loading off and only use  
it on particular objects when necessary... the application will tend  
to perform better (based on the totally unscientific testing  
mechanism summed up by this statement: Hmm, it seems a bit faster  
this way... cool.) ;)

The couple of exceptions to this is one-to-many relationships with  
LOTS of children where loading up an object and it's 200 composites  
would take a ton of time and wads of memory... that's something you'd  
probably want to define as lazy load (and I get the impression that  
this is why lazy load is there to begin with). There are aiso times  
when you might need to have table a relate to table b and table b  
relate back to table a and you use lazy load to prevent recursion on  
one of the relationships (although I was under the impression that  
bidirectional relationships weren't supported and this would blow up  
on you when you tried to write to the DB).

While I'm steadily improving my Transfer skills, I still have tons  
and tons to learn, so I'm sure someone here has better advice than  
this... I'm just telling you where I'm at right now.

HTH,
J


On Oct 23, 2008, at 2:30 AM, Martijn van der Woud wrote:

>
> Hi there,
>
> Maybe (and hopefully! ;) ) this is obvious to some of you, but not to
> me: is there any reason not to set lazy="true" on all of my
> compositions? In other words, are there any downsides to lazy loading?

--~--~---------~--~----~------------~-------~--~----~
Before posting questions to the group please read:
http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer

You received this message because you are subscribed to the Google Groups 
"transfer-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/transfer-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to