V11 Posting Speed

Overview
This article discusses issues with posting performance in V11.
Why is it slower?
With GibbsCAM V11 and the integration of UKM technologies, the posting speed of GibbsCAM has been lowered, sometimes to a large degree. The main reason for this slowdown is that the Post Engine ( the part of GibbsCAM that runs post processors) has had fundamental changes in it's operation.
Extended Error Checking
The Post Engine does many more error checks while posting in order to verify that the posting process is generating a valid program. These checks take time, and slow down the posting process.
UKM Machines
The Post Engine is no longer forced a limit of 3 linear axes and 2 rotary axes. This change to an arbitrary number of axis, with possible redundancies, means there is much more data to process during posting. Any machine can have any number of axes, so the system is no longer able to do simple computations that assume X,Y,& Z. Posting must now be aware of all MDD configurations. The arbitrary nature of this type of machine definition leads to processing algorithms that are much more robust then those used in previous versions, but also slower.
Simulation Synchronization
The posting system is now based on the same kinematic process that Machine Simulation uses. This allows our post processors to accurately output exactly what was shown in the software, but at a cost of processing speed.
What Can be done?
While GibbsCAM is always being optimized for speed, many slowdown issues can be attributed to inefficient post code. Several operations in posts that used to be quite fast, now take more time, based on the reasons above. Most legacy post processors can be changed to post faster with identical output. Bellow are several actions that can be taken by a post developer to increase speed.
Compile as POST with Compost4
The POST format as built by Compost4 produces a post processor that will have an overall speed increase. Compost4 has a built in optimizer that will speed up common posting functions like Math, and IF/ELSE tests. Testing has shown speed increases up to 30% for some files, just by recompiling a post as POST.
Remove Extra EachOp/NextOp loops
Since the post engine now uses technology from the simulation system, operation loops are the same thing as doing a full simulation. Every EachOp/NextOp loop has the potential to iterate every move in the program. This iteration takes time. Posts that use EachOp loops to "scan" for things, are negatively impacted each time they do so. When possible posts should only run a single EachOp/NextOp loop for each flow.
The most common uses of extra op loops are;
Tool Lists
Many of these uses can be replaced with the new EachSortedTool/NextTool loop and it's associated commands. It is also possible to minimize the number of operation loops used for tool lists by using the new Named Record Lists commands to build a tool list for later iteration.
SetHome
Posts that do an EachOp/NextOp loop in order to call SetHome on the first operation can simply call SetHome, the loop is superfluous.
5Axis Checks
Older 5 axis posts scan the operation loop looking for 5 axis operations that are not programed in CS1, this is both incorrect and no longer required. Posts can choose to output a 5 axis op in any coordinate system it wants, even the Part XY. These checks should just be removed.
Longhand Output of Milling Repeats
Older posts that expanded tool-paths into longhand output using prog code are very inefficient, they spend a lot of time jumping back and forth between the same program states. It is much more efficient to have the Post Engine handle subprogram expansion by using calling ForcePatternExpand and ForceZRepExpand at the program start. These commands will force repeats to be per-expanded and process much quicker, bypassing the complicated post processor logic.
Quadrant Loops
The EachQuadrant/NextQuadrant loop is very slow in a kinematic sense, the math required to segment to an arbitrary axis is quite expensive. Most CNC machines do not need to stop arcs on quadrants, but instead simply need to limit the maximum arc angle that is output. Posts should replace the Quadrant Loops with calls to EACHArcSegment/NextArcSegment using the SetArcSegmentMaxAngle function to set an angle limit of 90 or 180.