render-perf

A guide for improving the speed of Grida Canvas, a Rust-based graphics rendering engine.

In plain words
What is it for?
It is for optimizing panning, zooming, compositing, caching, object removal from view, and frame-time budgets, as well as writing or reviewing performance tests.
Why use it?
It helps investigate slow drawing and performance regressions with benchmarks, profiling, and analysis of rendering work.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/gridaco/nothing/render-perf
Any agent
npx skills add gridaco/nothing --skill render-perf
Clone the repo
git clone --depth 1 https://github.com/gridaco/nothing

Made for: Claude Code, Codex.

Per session 55 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 7,744 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00055 $0.07744
Opus 5 $0.00028 $0.03872
Sonnet 5 $0.00011 $0.01549
Haiku 4.5 $0.00006 $0.00774

Measured 2d ago against content hash 8b9e907e33ee, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

render-perf scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/render-perf/SKILL.md · 724 lines

How it starts

The opening of the file, as written. The whole thing — 724 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Grida Canvas Engine — Performance Development

Workflow and reasoning framework for render performance work on the Grida Canvas Rust engine.

When to Use This Skill

  • Benchmarking canvas rendering
  • Optimizing frame time for any camera operation
  • Designing or modifying caching strategies
  • Analyzing benchmark results
  • Writing or auditing benchmarks
  • Investigating performance regressions

How to Orient Yourself

Before touching any code, build context by reading these sources in order:

  1. Read crates/grida/AGENTS.md — crate conventions, test/check commands, benchmarking instructions.
  2. Read docs/wg/feat-2d/optimization.md — the master optimization document. It describes every optimization strategy, measured costs, and the rendering pipeline. This is the single most important file.
  3. Browse docs/wg/research/chromium/ — research notes on how Chromium solves equivalent problems. Start with index.md for the map, then read whichever documents match the problem at hand.
  4. Read existing benchmarks — look in crates/grida/benches/ to understand what is already measured and how.
  5. Read crates/grida_dev/src/main.rs — the bench and bench-report subcommands show how GPU benchmarks work with real .grida scene files. bench-report is the bulk mode that outputs JSON across all fixtures.

Use grep and glob to discover the current state of code rather than relying on hardcoded paths. File locations shift as the engine evolves.

Key discovery queries

What you need How to find it
The renderer entry point grep "struct Renderer" --include="*.rs" in crates/grida/src/
Camera change classification grep "enum CameraChangeKind" --include="*.rs"
How compositor cache works grep "struct LayerImage" --include="*.rs" and read the containing module
Promotion heuristics grep "fn should_promote" --include="*.rs"
Where zoom invalidation happens grep "zoom_changed|mark_all_stale|invalidate_all" --include="*.rs" in src/runtime/
Frame pipeline flow Search for fn queue|fn flush|fn draw|fn frame in the renderer file
Benchmark fixture scenes --list-scenes flag on grida_dev bench, or run bench-report on a directory
Config toggles (compositing, atlas, etc.) grep "set_layer_compositing|set_compositor_atlas|set_interaction_render_scale" --include="*.rs"
Existing .plan.md proposals glob "docs/wg/feat-2d/*.plan.md"
Scene loading pipeline grep "fn load_scene" --include="*.rs" in src/runtime/scene.rs
Layout engine entry point grep "fn compute\b" --include="*.rs" in src/layout/engine.rs
Text measurement stats grep "ParagraphMeasureStats" --include="*.rs"
Skip-layout config grep "skip_layout" --include="*.rs" in src/runtime/
Load-bench CLI tool Read crates/grida_dev/src/bench/load_bench.rs

Read the full file on GitHub · 724 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 724 lines · 55 tokens per session scan A 8b9e907e33ee

Subscribe to this mod's changes

render-perf is a skill published in the GitHub repository gridaco/nothing (43 stars, last pushed 2d ago), licensed Apache-2.0. It adds 55 tokens to every session and 7,744 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

freya

Freya Rust GUI framework best practices, patterns, and conventions. Use when writing Freya components, hooks, elements, or working on a Freya project.

marc2332/freya · 35 tokens

docs-svg-kit

Author SVG figures for Grida docs — diff-able, version-controlled vector diagrams embedded in doc pages instead of screenshots. Provides reusable primitives (selection chrome, size badges, anchor pins, resize cursors, click ripples), color/typography tokens, a starter template, and finished examples to crib from.…

gridaco/grida · 145 tokens

editor-perf

Guides performance investigation, benchmarking, and optimization of the Grida Canvas web editor (TypeScript reducer, Immer, React hooks). Use when profiling reducer dispatch cost, diagnosing slow interactions (drag, resize, color change), writing or running editor benchmarks, instrumenting with PerfObserver, or…

gridaco/grida · 69 tokens

sdk-seam

Discipline for the seam between two SDKs (or two sides of one contract) that the same hand writes. The failure mode: "we own both sides" produces dirty contracts no foreign reviewer would accept. The exercise: pretend the other side is FFI, IPC, or a network protocol you cannot rewrite. Spawn an adversarial subagent…

gridaco/grida · 142 tokens

ai-models

Research, compare, and update AI model configurations. Covers text model tiers, image and video generation models, image tool models, pricing data sourcing, and provider-cost metering against prepaid org credit. Use when bumping model versions, adding new models, updating pricing, or auditing model specs against…

gridaco/grida · 65 tokens

sdk-design

Doctrine for designing and evolving any SDK Grida ships — TypeScript, Rust, or otherwise. "SDK" here means a surface that crosses a foreign-or-foreign-treated boundary: published packages, separately-versioned consumers, FFI bindings, public-by-design modules. An SDK's job is to refuse; a strict, honest surface…

gridaco/grida · 199 tokens