Why does Generate Business Process take so long?

Re: “Generate Business Process” button in Modeller 6.1.5.

Why does it take so long (1-2 minutes) to generate the model?

Seriously. What is actually going on when I click that button?

I can see that on my server it causes the CPU to max out, so it appears to be CPU-bound.

But really. What on earth can it be doing that is so intensive? A man could probably be placed on the moon using the same number of CPU cycles!

This specific Business Process has only 8 steps… subscribes and publishes one document. Generating this state machine must take, what? 100ms? Write that to the Process Audit database (or whereever the models are stored). Ok add another 500ms.

Yet it appears each “step” in the model (according to the Modeller log) takes many many seconds… what on earth?!!