Speed prefetch vs typedview

Posts   
 
    
G.I.
User
Posts: 172
Joined: 09-Jun-2005
# Posted on: 22-Aug-2007 13:29:37   

Hi,

I have a question: If I have a project and need to show a grid with details of deliverables that are related to this project (not editing), what is the best way:

Load currentProject Entity and prefetch and entitycollection with the related deliverables and bind it to a datagridview using an LLBLGenProDataSource?

or

Load currentProject Entity, and use a typedview with projectID as filter and bind it to a datagridview using an LLBLGenProDataSource?

To me the first seems easier, the second faster ... but is it much difference or can I ignore that?

And how about using entitcollections for dropdownlists vs typedview?

  • G.I.
stefcl
User
Posts: 210
Joined: 23-Jun-2007
# Posted on: 22-Aug-2007 13:41:37   

I think that the best way to compare typedlists and entitycollections is to put the generated SQL queries of both scenarios side by side.

Could you post them?

jmeckley
User
Posts: 403
Joined: 05-Jul-2006
# Posted on: 22-Aug-2007 14:11:28   

here are the things I would consider.

  1. number of records retrieved is #1. however both collections and typedlists can be paged so this become mute.
  2. how complex is the collection graph? for simplicty of binding a typedlist could remedy complex relations by flattening the graph (1:1 and n:1).
  3. along those same lines... how many fields do you need to display vs. the number of fields in the graph?
  4. how am i using the data? read-only or modify.
Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 22-Aug-2007 16:14:54   

Speaking about the preformance: for read-Only purposes, a TypedList / DynamicList can be slightly better.

G.I.
User
Posts: 172
Joined: 09-Jun-2005
# Posted on: 22-Aug-2007 20:01:08   

At this moment we are developing a not too big application. So maybe 20 deliverables with 10 columns in the table of which 5 will be used to show on the web readonly ... so not much difference there actually ... and there are pages where I can do this on 5 grids, lists, dropdowns ...

The real question is: Might it improve i maybe a second or are we talking miliseconds now?

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 23-Aug-2007 10:53:34   

The real question is: Might it improve i maybe a second or are we talking miliseconds now?

That's a very subjective question, that depends on many criteria. You'd better test it yourself in a real life simulation.

Or you can take stay on the safe-side and use TypedLists/ DynamicLists, as you know forhand that's the optimum in a Read-Only scenario.