Questions tagged [plinq]

PLINQ is a parallel query execution engine for LINQ. PLINQ supports the data parallelism pattern by adding additional syntax to allow queries to be declared as running in parallel.

PLINQ is a parallel query execution engine for . PLINQ supports the data parallelism pattern by adding additional syntax to allow queries to be declared as running in parallel.

Related Links

365 questions
0
votes
1 answer

PLINQ Aggregate exception I don't understand

I was waching the PLINQ PCD09 presentation by Igor Ostrovsky, and wanted to try to see what I could get out of my CULV laptop. At a point I got a strange exception and I'm not sure what it means. I've condensed the code for better overview. It is…
Moberg
  • 783
  • 1
  • 8
  • 17
0
votes
1 answer

Multiple REST API requests using PLinq

I'm trying to clean this up so experts can help me move forward. as "svik" suggested below, after all the tasks are completed, I have a HTTPResponseMessage[]. How do I know what response was for what request? var tasks =…
billboard
  • 785
  • 4
  • 13
  • 25
0
votes
1 answer

PLINQ + LINQ = NRE?

What is the reason for random NREs when running the code below? Given that results is initialized how is it possible to get t within lambda as null? var results = new List(); for (int i = 0; i < 100; i++) { Parallel.For((index) => …
User18165
  • 115
  • 9
0
votes
2 answers

Why PLINQ is giving worse performance then LINQ Query?

I am trying to understand PLINQ. So for that,I am querying database which has 102915 products in it. But shockingly I am seeing that PLINQ takes 18 secs where normal query takes only 4 secs. To understand, I have read this article, PLINQ Performs…
Hakoo Desai
  • 341
  • 3
  • 4
  • 21
0
votes
0 answers

How does Parallel.Invoke() method works?

Does Parallel.Invoke() methods uses multiple threads to execute each action in a different thread. Example: Parallel.Invoke(() => { YourFirstAction(param1, param2, param3, param4); }, // close first Action () => { …
Ankush Jain
  • 5,654
  • 4
  • 32
  • 57
0
votes
0 answers

PLINQ Parallel issue

I have a problem related with the PLINQ. Imagine that I have a list of products Queue _products = Queue() for a costumer, lets say 30 products for the customer A, and I want to insert them using…
0
votes
0 answers

Is my PLINQ code threadsafe?

I have the following code: static void Main(string[] args) { DateTime currentDay = DateTime.Now; List taskList = new List(); List markets = new List() { "amex", "nasdaq", "nyse", "global" }; …
0
votes
1 answer

Using PLINQ for multiple ID lookups

I am using entity framework to connect to a SQL server database. Lets say I have a list of SQL table primary keys to lookup. List idList I could return the list of all the matching rows using var results = (from id in idList …
gre.p
  • 319
  • 1
  • 2
  • 8
0
votes
0 answers

How to implement a custom Partitioner

I am trying to understand how to implement Partitioner. My case: We read from a file and we insert to the Azure table storage. We use tasks in order to speed up the process. The file has nearly 10,000,000 lines. I tried to implement a more…
Veronica_Zotali
  • 253
  • 1
  • 3
  • 13
0
votes
1 answer

How can I use plinq to fill an array with strings returned from my "FormatStatus" Method?

This is my first time playing around with linq and I can't quite figure out what I need to search on google to find out what I am doing wrong, so here I am. Here is what I have so far: var formattedStatuses = (from status in…
Justin
  • 2,399
  • 4
  • 31
  • 50
0
votes
2 answers

Weird behavior of multithread random numbers generator

Please check below code, this code try to compute birthday conflict possibility. To my surprise, if i execute those code with sequence, the result is expected around 0.44; but if try on PLinq, the result is 0.99. Anyone can explain the result? …
DingLi
  • 791
  • 10
  • 19
0
votes
1 answer

Why I can't use List.Add() on Parallel.For or Parallel.Foreach?

This is my code : Parallel.ForEach(Students, item => { StudentModel studentModel = new StudentModel(item); // Maybe he/she has alot of name foreach (var words in studentModel.StudentNames.Split(',')) { if…
qakmak
  • 1,287
  • 9
  • 31
  • 62
0
votes
2 answers

How I can change a For loop to PLINQ syntax?

I have a real problem with my code which is very slow and make it useless. I must deliver my results next week and by this code it takes more than 4 weeks! As this code calculates fluid motion, we deal with more than 1 million cells. Therefore, my…
0
votes
0 answers

Why is Parallel Sum slower than sequential counterparts?

I wrote a little program to check the performance of Sum() working on an AsParallel() enumeration (i.e. PLINQ). First, I generate an IEnumerable. The range is not particularly large because then the LINQ Sum() would result in an…
Gigi
  • 28,163
  • 29
  • 106
  • 188
0
votes
0 answers

Parallel Linq Optimization with SelectMany

I'm scanning and transforming several hundred thousand Excel workbooks each with variable number of worksheets. I'm taking a PLINQ query on the array of workbook file names, opening each workbook using NPOI, enumerating the worksheets, flattening…
Alton XL
  • 635
  • 6
  • 18