Last month I claimed chant sits to the left of other infra toolchains when it comes to execution.

Two bars. In the cdk synth bar your code and its infrastructure library execute from almost the start until the plan exists. In the chant build bar the tool reads your files like a recipe without cooking it and your program never runs.

To prove this claim I wrote the same small app for both CDK and chant and verified both produce the same resources. Then I ran each tool with Node’s profiler recording.

A recording reads from left to right, with time on the X axis. Every block is code that ran, and highlighted blocks are caused by your app, meaning your files, plus the infrastructure library they pull in.

Here are both runs, same recorder, same lighting rule:

Two recorded timelines stacked. The cdk synth strip is mostly bright: user code and aws-cdk-lib executing from a marker near the left edge to the end. The chant build strip below is busy but uniformly dim: nothing qualifies as user code executing.

The top strip is CDK. The yellow line near the left edge is your program starting, and from there the strip stays lit to the end. Everything CDK knows about your infrastructure it learned by running your program and watching what it constructs. Zoom in and you can read it happening:

A magnified section of the cdk synth recording showing constructor frames named ItemsStack, Table2, Role2 and Function2 highlighted.

Table2 is your database table. Role2 is your IAM role. Function2 is your Lambda. Each one came into existence because a constructor executed inside cdk synth.

This is CDK’s design. There is no way to know what a CDK app builds without running it, which means whatever your program does happens before the tool knows what it’s looking at.

The bottom strip is chant, and it’s just as busy, but nothing lights up. That’s not a lucky sample from a profiler that happened to look away: the build refuses to finish unless it can account for every file without running it.

Don’t take the pictures’ word for it. Both recordings are live in spicypath, my profile viewer. Nothing to install and no login:

One caveat, this works for files written in chant’s supported style. Files that are deliberately programs still run, in a sandbox, with intention. What sits left of the execution line is exactly the part of your repo that describes infrastructure rather than computes it.

Everything regenerates from committed inputs and the procedure lives in the harness. No timing numbers anywhere in it, on purpose. This is not a benchmark.

Read more