Does anyone have experience using PLINQ with ASP.NET? Is this a good combination, or something to avoid in most situations?
I develop an intranet ASP.NET site for a lawfirm (~100 users). Several pages include non-trivial LINQ code, for example, we have a bank rec page that compares thousands of financial transactions between our accounting database and the bank's data, using LINQ to Datasets. This is slow, so I am tempted to try PLINQ, but I am worried this could lead to 1 request monopolizing the web server. Having the bank rec run 4 times faster but shutting all other users out while it is running would not be an improvement.
I know there are much faster solutions than LINQ, but I would rather have short code to maintain.
Right now, we have a Dual Pentium 4 web server, but I am hoping we can upgrade to decent hardware in the near future.
Just from what I've heard, there are only a few cases where PLINQ is slower than LINQ. I hadn't heard any cases where PLINQ monopolized things as you described. Microsoft has a session at PDC09 PLINQ: LINQ, but Faster!. I hope this video will help you decide if PLINQ is right for you, but as they say, measure before and after. Good luck.
I have a similar concern. I'm assuming plinq uses a backgroud thread from the thread pool, if this is the case then it would impact scalability of the site. You get by default 100 threads per cpu if you have a low used site you might want to burn some extra threads per user request, but I'd do so very cautiously
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With