Reputation: 319
I have a Foreach Category within a Foreach of Products with a run time of 40 minutes. Basically it builds an HTML table for each Category, and within that category it places the Products together with the right Specialization.
Current setup:
I've turned on Concurrency Control with a Parallelism Degree varying from 10 to 50 but the performance stays slow. Also, when I add parallelism to Products and Specialization the data is not properly sorted. Any idea's how I can boost the performance?
Upvotes: 0
Views: 437
Reputation: 15754
For this situation, I'm afraid there isn't a good solution to implement your requirement.
You mentioned that you have enabled "Concurrency Control" with a Parallelism Degree varying from 10 to 50, and it leads to the data is not sorted. I'm afraid you have to change "Degree of Parallelism" to 1, then the data will be sorted. But it will spend much more time. One way to save some time is enable "Concurrency Control" and set "Degree of Parallelism" with 5 for the first "For each" loop, because the first "For each" loop is to build HTML table for each Category, so maybe it doesn't matter if it's out of order(but it also depends on your requirements, do you care the order of tables).
Upvotes: 1