Should I use PLINQ with ASP.NET?

Does anyone have experience using PLINQ with ASP.NET? Is this a good combination or something that can be avoided in most situations?

I am developing an ASP.NET website for an intranet for a legal entity (~ 100 users). Several pages include a non-trivial LINQ code, for example, we have a bank abstract page that compares thousands of financial transactions between our account and bank data using LINQ to Datasets. This is slow, so I am tempted to try PLINQ, but I am worried that this could lead to 1 request to monopolize the web server. The presence of a bank-bank is 4 times faster, but closing all other users during its operation will not be an improvement.

I know there are much faster solutions than LINQ, but I would rather have a short code to support.

We now have a Dual Pentium 4 web server, but I hope that in the near future we will be able to upgrade to decent equipment.

+6
linq linq-to-dataset
source share
2 answers

Just from what I heard, there are only a few cases where PLINQ is slower than LINQ. I have not heard any cases where PLINQ monopolized things as you described. Microsoft has a session on PDC09 PLINQ: LINQ, but faster! . I hope this video helps you decide if PLINQ is right for you, but as they say, measure before and after. Good luck.

+1
source share

I have a similar problem. I assume that plinq uses the backgroud thread from the thread pool, if so, this will affect the scalability of the site. You get 100 threads per processor by default if you have a low-use site that you might want to record some additional threads for each user request, but I would do this very carefully

+1
source share

All Articles