Hi Jeromy
I'm not clear what the performance problem you mention could be. This
is what I'm doing myself and while my app's performance is OK, I would
love to improve it. What do you mean by (e.g. select n+1 due to
iteration)?
All the best
Adam
---
Actually, I've assumed you're using ORM like JPA/Hibernate/TopLink If
not it's not as relevant, but still could be.
The select n+1 problem is well described over at Hibernate:
http://www.hibernate.org/118.html
Basically, the problem occurs when you use lazy fetching and iterate
through a collection. Instead of retrieving the entire collection from
the database in one efficient query, the implementation performs a query
for the parent object and then one query for each item in the collection
in each pass of the iteration (hence n+1 selects). It's one of the
risks of lazy fetching and using the session-in-view pattern.
Developers often don't realise it until they analyse the queries because
it seems slow. Caching can avoid it and also complicates it.
As you're accessing objects and hiding the fact they're loaded from a
database, it's very easy to accidentally trigger this problem. If your
converter is performing the query itself or through a service you can
easily avoid it.
Hope that make sense.
regards,
Jeromy Evans
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]