PLinQ - Support

Discussion of open issues, suggestions and bugs regarding LinqConnect – Devart's LINQ to SQL compatible ORM
Post Reply
Zero-G.
Posts: 398
Joined: Sat 09 Dec 2006 12:20

PLinQ - Support

Post by Zero-G. » Thu 25 Feb 2010 16:07

Hey

Is there a support of PLinQ?
If so, can you please provide a sample.
If not, can you please tell me, if you think about it!?

THX

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Fri 26 Feb 2010 09:54

Parallel LINQ is applicable to LINQ to Objects and LINQ to XML.
Microsoft does not offer support for Parallel LINQ to SQL or Parallel LINQ to Entities.
Could you please describe the scenario scenario where you want to use PLINQ with our components?

Zero-G.
Posts: 398
Joined: Sat 09 Dec 2006 12:20

Post by Zero-G. » Fri 26 Feb 2010 10:08

Hey

As I told you in one of my last posts, the performance is not very high (I think so...)
So, I use your components to get data from a webserver to the client, where the client can see all customers. - There are about 10000 customers (not so much I think) - To get the customers, the database connection uses about 2-3 seconds (what is OK) - but to generate the objects out of the result, your components use about 10 seconds. - I tested this with a local database and with the one on the internet. - Both test use about the same time. - This tells me, that is not the connection. - It has to be the performance by gettint out the objects.

What I now would do is as follows: execute the LinQ query to the database and make a .ToList and this ToList should be executed parallel, so that the user don't think that my program hangs.

Hope you understand - THX a lot

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Fri 26 Feb 2010 15:14

A good try, though.
Unfortunately, PLINQ gets an IEnumerable as an input.
Using PLINQ with Devart LINQ to SQL, you will obtain records first, our code will not be aware
of PLINQ (it will be executed first, so there is no use for PLINQ).
Have you tried the DataContext.CompiledQueryCache setting? It can help.

Zero-G.
Posts: 398
Joined: Sat 09 Dec 2006 12:20

Post by Zero-G. » Fri 26 Feb 2010 15:22

Yes, we talked about QueryCached in a other thread.
Doesn't help...

Any other suggestion?

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Tue 02 Mar 2010 10:54

Maybe there is a sense in implementing paging using Skip/Take?
In this case you will need to load only a subset of records, and this should really speed up the query.

Zero-G.
Posts: 398
Joined: Sat 09 Dec 2006 12:20

Post by Zero-G. » Tue 02 Mar 2010 11:18

No,
I have to load all customers not only the first 100 :D

Please try out to get about 2000 rows. - Then you will be able to reproduce what I mean.

THX

john.valentine
Posts: 7
Joined: Tue 09 Mar 2010 20:15

August 2010 issue of Visual Studio Magazine

Post by john.valentine » Tue 31 Aug 2010 15:07

The August 2010 issue of Visual Studio magazine does an expose (pp. 14) on how to exploit multi-core processors with .NET 4 and Visual Studio 2010. In the article it plainly shows PLINQ working with an actual (Northwind) database - so PLINQ is not just for use with LINQ to XML and LINQ to Objects.

I highly recommend this magazine by the way, it is an excellent source of information for developers who like to stay on top of new and emerging Microsoft technologies and development solutions.

So the question was, and still is, can the Devart dotConnect products take advantage of PLINQ?

Inquiring minds would like to know...

StanislavK
Devart Team
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Post by StanislavK » Wed 01 Sep 2010 16:32

Thank you for the helpful link. At the moment, the PLINQ support is unavailable, but we will analyze the possibility of implementing it. We will report here about the results.

Please note that the parallel execution can help only if several sub-queries are used (like when tables from different data contexts are joined), the data fetch won't speed up in the case of simple queries.

john.valentine
Posts: 7
Joined: Tue 09 Mar 2010 20:15

Post by john.valentine » Wed 01 Sep 2010 18:35

StanislavK wrote:Thank you for the helpful link. At the moment, the PLINQ support is unavailable, but we will analyze the possibility of implementing it. We will report here about the results.

Please note that the parallel execution can help only if several sub-queries are used (like when tables from different data contexts are joined), the data fetch won't speed up in the case of simple queries.
Thank you for the straight answer regarding PLINQ. We are using the dotConnect for Oracle product and are pretty happy with it, that said, our overall performance marks could be better. Combining PLINQ with an upgrade to .NET 4 could help get us there, but I am not comfortable recommending that kind of upgrade just yet.

I look forward to receiving more communication on this topic in the future.

Kind Regards,

John

Post Reply