Running gen pro queries parallely

Posts   
 
    
Damodar
User
Posts: 23
Joined: 30-May-2013
# Posted on: 05-Jun-2014 18:33:06   

Hi,

Please find the gen pro details I use as below:

  • What LLBLGen are you using? - The llbl gen pro version is 3.5 Final, released on May 1st, 2012.

  • Are you using Adapter or SelfServicing templateSet? - Adapter

adapter.FetchEntityCollection( entityCollection, bucket, 0, sort, prefetchPath, fieldIncludeExcludeList, pageNumber, pageSize);

I use the fetch entity collection to get records from database. There are scenarios when the records from multiple entities need to be fetched and currently this happens one after the other. To improve performance, Is there a way to fetch records in parallel so that records are fetched faster, hoping there is something to achieve this built in the gen pro framework.

Thanks and regards, Damodar

Walaa avatar
Walaa
Support Team
Posts: 14994
Joined: 21-Aug-2005
# Posted on: 05-Jun-2014 22:33:02   

You can manage this from your code. Create multiple Async methods that include the fetch routines.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39888
Joined: 17-Aug-2003
# Posted on: 06-Jun-2014 09:34:50   

Damodar wrote:

Hi,

Please find the gen pro details I use as below:

  • What LLBLGen are you using? - The llbl gen pro version is 3.5 Final, released on May 1st, 2012.

  • Are you using Adapter or SelfServicing templateSet? - Adapter

adapter.FetchEntityCollection( entityCollection, bucket, 0, sort, prefetchPath, fieldIncludeExcludeList, pageNumber, pageSize);

I use the fetch entity collection to get records from database. There are scenarios when the records from multiple entities need to be fetched and currently this happens one after the other. To improve performance, Is there a way to fetch records in parallel so that records are fetched faster, hoping there is something to achieve this built in the gen pro framework.

Thanks and regards, Damodar

I think you mean, processing the rows of the resultset from the query in parallel, then the answer is: no. A datareader will process the rows from the server sequentially.

Consider what you need to fetch and then check whether you don't fetch too much data and look into limiting the amount of data to fetch with better filters.

Frans Bouma | Lead developer LLBLGen Pro