Skip to content

Faster first frames, modern diagrams, and a docs site latkit draws - #81

Merged
lukelowry merged 54 commits into
mainfrom
develop
Oct 22, 2026
Merged

lukelowry merged 54 commits into
mainfrom
develop

Conversation

@lukelowry

@lukelowry lukelowry commented Oct 22, 2026 •

Copy link
Copy Markdown
Owner

Shortens a cold page's first frame and trims the wasm, gives diagrams a modern look, fixes traced plots, and rebuilds the documentation around pictures latkit draws itself. Releases through .changeset/first-frame.md.

Rendering

  • One compile queue per GPU, most urgent first: what frames draw with at once, text as the browser's compile workers free up, then transitions, lit rows, probes, and queries a few at a time.
  • A view's first frame draws its marks; labels, glyphs, and the overlay fade in once their pipelines land. complete still waits for everything.
  • loadLatkit() asks for the adapter early and makes the page's first GPU while the runtime loads.
  • Channels, label placement, and probes compile only what their marks read and are: joins, sampled fields, view state, and the primitive drawn.
  • Wasm 12% smaller (11% gzipped).
  • The globe's atmosphere is a thin rim and halo instead of a wide glow over the ground.

Diagrams

  • New theme options: outline, corner, portSize, and bend (wire bends no longer follow edgeSpacing).
  • shadow: true on blocks and groups lays a soft shadow on the sheet.
  • Blocks and groups are bordered, groups lose the header band, and corners, status rings, and port rings zoom with the drawing. Blocks make room for top and bottom port labels.
  • Text defaults to the system sans-serif instead of monospace.

Fixes

  • A mark ordered by priority that traces a sampled field drew nothing; it now draws the whole trace.
  • A plot's y-axis label could be pushed off the picture; a plot's axes start below its title.
  • The duplicate-mark error asks for a name.

Documentation

  • Sphinx, MyST, and Furo on Read the Docs, built from a locked environment (docs/uv.lock): one guide, the command line, a performance table, examples, and the API reference.
  • A gallery of 13 pictures drawn by the latkit command line from TypeScript in docs/gallery, with no Python. The hero is a DC power flow of ACTIVSg70k on the globe, raised by recorded frequency.
  • A new icon, a shorter README, CONTRIBUTING.md, and RELEASING.md.

Measured (cold Chrome)

Before After
Diagram first-frame pipelines, GPU / SwiftShader 264 / 990 ms 144 / 360 ms
Network first-frame pipelines, GPU / SwiftShader 275 / 1068 ms 209 / 293 ms
Network page complete, SwiftShader 7.8 s 5.6 s
Release wasm, gzip 1,318,784 B 1,175,017 B

Testing

  • cargo test --workspace, with a new test that traces in priority order; clippy in every CI configuration; fmt
  • pnpm typecheck, lint, format, and test
  • The docs build with warnings as errors from the lock
  • The network and diagram example pages checked in Chrome on the GPU

@lukelowry lukelowry changed the title Faster first frames and a smaller wasm Faster first frames, modern diagrams, and a docs site latkit draws Oct 22, 2026
@lukelowry
lukelowry merged commit 5860c03 into main Oct 22, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant