Docs

proa chunks

Inspect static runs and dynamic slots.

Open Markdown

proa chunks estimates how html! and html_sync! macro bodies split into consolidated static byte runs and dynamic slots. Use it when tuning hot SSR routes or reviewing a template that changed unexpectedly.

proa chunks src/pages/home.rs
proa chunks src/components
proa chunks --json src/pages/home.rs

Report Fields

FieldMeaning
runsNumber of consolidated static byte runs.
static_bytesEstimated bytes across all static runs.
largest_runEstimated size of the largest static run.
text_slotsDynamic child/text slots such as {child}.
attr_slotsDynamic attribute slots such as class={classes}.

Dynamic text and attribute slots create run boundaries. Fewer, larger static runs generally render faster because more bytes can be copied as consolidated static segments.

Example

proa chunks src/pages/home.rs

Text output includes one row per discovered macro body:

macro (file:line)                                runs       static      largest  txt{} attr{}
src/pages/home.rs:18 html_sync!                     4         420B         180B      1      2

Use --json when feeding the output to scripts or dashboards.

Changed Files

chunks uses the same Git file-selection flags as lint and check:

proa chunks --changed --base origin/main
proa chunks --staged --json

The report scans Rust files and ignores non-HTML macro dialects.

How To Use The Numbers

Search

Type at least 2 characters