Thread limitation when running Parallel.Foreach/Producer Consumer?

Hi


We have a program that reads a directory of emails and converts the emails and attachments to PDFs and extracts the text from the PDFs, it’s using a combination of Email, Cells, Pdf and Words.

When we run it in parallel.foreach mode on an 8 core machine it will only go so fast using 8 threads, even if we change it to manually create 16 threads (using a producer consumer approach) it still doesn’t run any faster.

However if we run the application twice against 2 sets of the same data the CPU usage increases and it converts the data in the same amount of time.

So 100 emails with approx 76 assorted attachments:
  • 1 process (8 threads) - approx 2m
  • 1 process (16 threads) - approx 2m
  • 2 processes on 2 copies of the same data - approx 2m
  • 2 processes on 1 copy of the data split into 2 directories - approx 1m
It seems like there is some form of locking/restriction in the DLLs maybe that is limiting the threads?

Given 90% of the processing time is spent doing Aspose activities are you aware of any DLL limitations that might cause this, the memory is negligible and so is the disk activity and this is all on a local machine so there are no network issues either.

Thanks

Simon

Hi Simon,


Thank you for writing to Aspose support team.

No such issue is reported earlier and it needs detailed analysis of all the activities performed using Aspose libraries. Could you please provide us the complete code with all the possible test cases, which can be compiled and executed here to re-produce the scenario? Also please provide us the sample emails so that exact environment is created here. It will help us to observe the issue and provide assistance accordingly.

Hi


Ok, if there is no known limitation then I will see if I can work out what the issue is, I will also try and generate some test data and a cut down program to demonstrate the issue but that will take me some time so I may be a while responding to this thread.

Cheers

Simon

Hi Simon,


Thank you for the feedback. We appreciate your assistance and cooperation in this regard.