Forum


Replies: 6   Views: 3929
Phpdocx consuming cpu when replacing template
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by therasim  · 13-05-2016 - 01:44

I'm using the library to create a 70-page average document and there's a section when I have to create dynamic placeholders in a table to then fill it properly.

The issue is that it takes a considerable amount of time (~30-50 secs) to generate the file and the CPU is being consumed by this process. And the major issue is that sometimes there are multiple people attempting to create a document like this at the same time and that makes it worse.

What can I do to mitigate this issue? My assumption is that the dynamic replacement is what can be causing the delay; if so, what can I do, given that I have to embed HTML on those dynamic placeholders?

Thanks,