Does PLINQ improves the performance of Directory/File Search? Can it be used in VB6?
-
Wednesday, March 28, 2012 2:34 PM
Hi There,
I am wondering whether PLINQ can improve the performance of Directory/File Search and can it be used in VB6?
- Edited by Bryan Robinsons Wednesday, March 28, 2012 6:34 PM
All Replies
-
Wednesday, March 28, 2012 3:27 PM
PLINQ is nothing but parallel extension to Linq. It takes advantages of Task Parellel library to execute Linq queries. Since, TPL makes effective use of Multicore processors to run the operations, you will get better performance over normal Linq or iterators.
And TPL is a part of .NET Framework so you cannot use it in VB6.
Please mark this post as answer if it solved your problem. Happy Programming!
- Proposed As Answer by Shweta Jain Wednesday, March 28, 2012 3:38 PM
-
Wednesday, March 28, 2012 6:41 PM
Hi Adavesh,
Regarding your sentence "TPL is a part of .NET Framework so you cannot use it in VB6", I do not agree with you.
So, why we have the CCW process? you can use PLINQ, LINQ, and TPL in Visual Basic 6. I have been using lots of .NET framework features in VB6 and VC++6 during last 10 years for lots of applications. You can learn more about how to use LINQ in VB6 by studying the following article:
http://blog.csharplearners.com/2012/02/06/visual-basic-6-linq/
Thanks,
Amir Ahani (MCSD.NET)
- Edited by Amir AhaniMVP Wednesday, March 28, 2012 6:48 PM
-
Wednesday, March 28, 2012 6:48 PM
Bryan,
PLINQ can be used efficiently with TPL to run queries for searching inside files and directories and it certainly improve the performance. I have used PLINQ for scenarios that your machine has 160 cores and I have got excellent results:
http://blog.csharplearners.com/?s=PLINQAs an example,
As an example, when you use PLINQ + TPL to search inside 8 CLOBs (large text files), say each of them about 1GB, it take 400 seconds on a machine with 8 cores, and it drops kind of linearly to 20 seconds on a machine with 160 cores!
Regards,
Amir Ahani (MCSD.NET)
- Edited by Amir AhaniMVP Wednesday, March 28, 2012 6:48 PM
- Marked As Answer by Bryan Robinsons Wednesday, March 28, 2012 6:54 PM
-
Wednesday, March 28, 2012 7:13 PM
Amir,
Is that right to say "CCW allows you to use all .NET framework features in old languages such as VB6, VC++6,... ?"
Geof MCSD+MCSE
-
Thursday, March 29, 2012 2:00 AM
Where are you using Linq directly in VB6? In the link you provided, CCW is a wrapper around .NET code that makes use of Linq. According to OP, he wants to know whether he can use PILINQ directly in VB6 if I am not wrong. So, he has to code in .NET as well.Hi Adavesh,
Regarding your sentence "TPL is a part of .NET Framework so you cannot use it in VB6", I do not agree with you.
So, why we have the CCW process? you can use PLINQ, LINQ, and TPL in Visual Basic 6. I have been using lots of .NET framework features in VB6 and VC++6 during last 10 years for lots of applications. You can learn more about how to use LINQ in VB6 by studying the following article:
http://blog.csharplearners.com/2012/02/06/visual-basic-6-linq/
Thanks,
Please mark this post as answer if it solved your problem. Happy Programming!
-
Thursday, March 29, 2012 12:31 PM
Let me make a quick change to your answer, then we are both on the same page:
The original: TPL is a part of .NET Framework so you cannot use it in VB6
The new one: TPL is part of .NET framework so you cannot use it "directly" in VB6.
Cheers,
Amir Ahani
- Edited by Amir AhaniMVP Thursday, March 29, 2012 12:31 PM

