on 02-25-2010 6:48 PM
Using the Gantt Diagram project available on SDN as a template, I created a transaction that produces a PNG Gantt chart that shows scheduled process orders.
Differences between my solution and SDN:
-Each row shows all Process Orders for a Resource across the specified period.
-Each Order has the Batch and Material information inside the rectangle, no text for start and stop times
-Misc other stuff like, the orders change color when they are running.
Anyway, with 16 production lines, it is possible that the graphic can be made up of 50+ order images during a given week.
Currently for testing, I'm using three resources with about 15 orders, and the transaction takes about 12 seconds to execute. Looking at the Trace information, each image renderer and subsequent image combiner are taking the majority of the execution time (.32 and .48 seconds respectively as shown below).
[DEBUG]: 00002.18800 Begin Action ImagePeriod : ()
[DEBUG]: 00002.50000 End Action ImagePeriod : ()
[DEBUG]: 00002.50000 Begin Sequence Sequence_28 : ()
[DEBUG]: 00002.50000 Begin Action AddPeriodToEncodedImage : ()
[DEBUG]: 00002.98500 End Action AddPeriodToEncodedImage : ()
This particulary image it not very complex, the width is updated at runtime (the image is typically about 200 wide.
<?xml version="1.0" encoding="UTF-8"?><svg xmlns="http://www.w3.org/2000/svg" height="600" width="1325">
<rect height="596" id="rectDay" style="stroke:#808080;stroke-width:1;fill:#f6f6f6" width="1325" x="0" y="0"/>
<rect height="50" id="rectDayHeader" style="stroke:#808080;stroke-width:1;fill:#C0C0C0" width="1325" x="0" y="0"/>
<text id="date" style="font-size:22px;text-anchor:middle;font-family:Arial;font-weight:bold" x="500" y="23">Di, 24.10.2006</text>
<text id="time" style="font-size:18px;text-anchor:middle;font-family:Arial;font-weight:bold" x="500" y="45">08:00 - 17:00</text>
</svg>
I can live with this performance, I would just like to know if there are any tricks to optimize this a bit.
Thanks,
Rod
You could try using the Dynamic Transaction Call Action or posting to the Runner to get some parallel processing going.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Rod/Christian:
You can reduce this time by a HUGE percentage by dynamically building up the SVG (SVG is nothing but an XML file) and then rendering it to an image once, rather than multiple image renderings and combines, which are computationally expensive.
You'd be using the various "link" types (append, replace, etc.) to achieve this. It's actually quite straightforward, and smoking fast.
Rick
User | Count |
---|---|
11 | |
6 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.