We would like to use the Form filling features of Aspose in a multi-threaded scenario in order to generate the high volume of PDFs in a reasonable amount of time. To give you an idea about the volume, we need to generate (and form fill) about 100,000 PDFs in less than 8 hours. However, when we use multiple threads, there appears to be synchronization locking thats preventing any real benefits from multi-threading (just a guess). Could you please suggest a way to resolve this or possibly a work-around?
Here is a description of the problem scenario:
When we fill fields on a PDF using using Aspose.PDF Forms, the slowest methods appear to be the following:
1. Form.FillFields(...) --> 566ms
2. Form.FlattenAllFields() 332ms
3. Form.Save(...) 215ms
Given one thread and filling the form fields for one PDF document, the average run-time is around 600 ms to 1000 ms. If we scale this to 100,000 PDFs, thats around 17-30 hours. The issue isn't that the operations are slow (although it would be nice if they were faster), the issue is that when we try to use multiple threads, there appears to be thread blocking going on (possibly using synchronization locks?) which is causing the threads to block and wait. As a result, the bottleneck is not the IO or the CPU, it is the blocking threads.
Is there a non-synchronized version of the Form class? Is this an option that can be turned off?
Any advice would be appreciated,