The Kilim Gazette

Notes on the web, type and slow making

Technology

Incremental builds, one read at a time

Which pages change when you fix a typo? Record what each page reads, and you know.

An abstract pattern of woven kilim motifs

A full build of a small site takes a second. Saving a file forty times an hour turns that second into a habit of waiting.

Track reads, not files

Every layout reads something: a title, a date, the list of posts. If the build records those reads, it can answer a precise question after each save: which pages read the thing that changed?

  1. Render each page through a proxy that notes the keys it touches.
  2. Fingerprint the values behind those keys.
  3. On the next save, compare fingerprints and render only the pages whose reads changed.

The boring part

The proxy is twenty lines. The hard part is making sure the incremental output is byte for byte the full build's, which is why every test runs both and compares them.

More in Technology