← TRON examples

Columnar stats

GET /api/notes/statsis a purely numeric table (notes per day, characters per day). Served withtronSerializer(columnar: true)and read withapi.tape(), it lands in oneFloat64Array— no row objects, roughly 3× faster than JSON.parse — and the route caches the encoded body at the edge for 30 s.

What to look at

  • The response body isclass C0: day,count,charsfollowed byC0(20321,7,412)rows — the shape the WASM scanner validates and reads directly.
  • Reload within 30 s: the response headerx-norns-cacheflips tohiton a deployed Worker (the dev platform proxy's Cache API is a no-op, so locally it staysmiss), and browsers revalidate with the ETag.
  • Without WASM (strict CSP) or when the server answered JSON, the same call still returns the samefields / rows / cols / tapeshape.
norns-ui v0.0.17 · early access