I’d like to ask you is it possible to use parallel programming in ASP.NET 4? For example PLINQ.
(Because all hosting servers are multi-cores now and will it give better perfomance?)
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes it’s possible. But in doubt it makes sense in the most cases. ASP.NET is already highly parallelized, as every request works in it’s own thread. If you spin off other threads to do some of the work, that would create overhead. This overhead will slow down other threads working on other requests. Then again, you will introduce another overhead when synchronizing the results to finish the request. Also this overhead will probably slow down the time required to answer the request.
There might be scenarios where that actually would help increase overall performance, but I think in general it’s not worth it.
Of course only stress tests with both approaches would make sure if its more efficient to go with PLINQ or to not use it.