I'm trying to improve the execution time of one of my reports which uses cfcharts to print graphs. The code itself is a loop of entities and for each entity I create a chart (it's a comparison report).
By doing this inline it takes almost a minute or more to complete due to the complexity of the report so I'm trying to use cfthread for this case but I'm not sure if it's possible.
Here's the code:
<body>
<cfloop array="#uuids#" index="uuid" >
<cfthread action="run" name="t#threadCount#" output="to#threadCount#">
...
<cfchart >
...
</cfchart>
</cfthread>
...
</cfloop>
</body>
As expected cfchart will not be "printed" inside cfthread though apparently it's being executed. How can I get the output of cfthread? One possible solution would be creating an image from cfchart and just use the image to build a document at later time when all threads finished but I was wondering if there's any way of getting the cfchart output from cfthread.