Free Support Forum - aspose.com

Multithreading problems

Hello,


I have tested document creating on multiple threads. Each document is creating on different thread - one thread for one document. When increasing thread amount, then document creating duration also increase. For example if I create document in one thread, creating duration is 35ms. If created 30 thread then creating duration increase to 150-200ms for one document.

I am using latest asponse.Word version (16.6.0.0). Also attached testing project.

Looks like that aspose not working on multithreading or maybe I do something wrong?

Hi Ernestas,

Thanks for your inquiry. We have tested the scenario and have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-14044. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

@Ernestas,

Thanks for your inquiry. Please note that CPU performance and memory usage all depend on complexity and size of the documents you are loading/generating.

It is to inform you that the issue which you are facing is actually not a bug in Aspose.Words. Our product team did not find any serious bottleneck in our import/export. Actually, it’s obvious that parallel execution slows down processing time. Perhaps your CPU has 4 cores. Each core opens 7.5 files in parallel. So, duration may increase up to 7.5 * 30 = 225ms.

Please check following ratio of slowing down a work on running in several threads. Could you please share your expected ratio?

ratio = <time of work on running N threads> / <time of work on running 1 thread> / <thread count> * <physical CPU cores>