Page 1 of 1

PLinQ - Support

Posted: Thu 25 Feb 2010 16:07
by Zero-G.
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

Posted: Fri 26 Feb 2010 09:54
by AndreyR
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?

Posted: Fri 26 Feb 2010 10:08
by Zero-G.
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

Posted: Fri 26 Feb 2010 15:14
by AndreyR
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.

Posted: Fri 26 Feb 2010 15:22
by Zero-G.
Yes, we talked about QueryCached in a other thread.
Doesn't help...

Any other suggestion?

Posted: Tue 02 Mar 2010 10:54
by AndreyR
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.

Posted: Tue 02 Mar 2010 11:18
by Zero-G.
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

August 2010 issue of Visual Studio Magazine

Posted: Tue 31 Aug 2010 15:07
by john.valentine
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...

Posted: Wed 01 Sep 2010 16:32
by StanislavK
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.

Posted: Wed 01 Sep 2010 18:35
by john.valentine
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