A polished version of the announced profiler will be part of the upcoming 0.8.0 M2 release of Xpand next Tuesday. It acts as a callback for any expression-based workflow component to measure the execution times of Xpand templates, Xtend functions and Check validations. Also, it constructs a call-graph model to introspect callers and callees and their corresponding call times. From this model you can then generate an HTML report as part of your generator workflow.
If you stay with the text-based GProf output format (another option to dump the collected data) you can also use tools like Gprof2Dot to visualize hot spots with colors and callees as painted connections.
The updated documentation explains how you can integrate the profiler into your workflow. Also, the Xpand Sample-Project Wizard creates a second workflow “generatorWithProfiler.mwe” where I have generated the above results from.
In a real-world project we were able to reduce the execution time of a workflow that originally took nearly half an hour down to less than 3 minutes using an earlier version of this profiler. It can also help you detecting unwanted indirections and recursions.