Skip to content

docs: refresh DD-061 performance roadmap#131

Merged
joshcramer merged 3 commits into
mainfrom
docs/dd061-performance-refresh
Jun 20, 2026
Merged

docs: refresh DD-061 performance roadmap#131
joshcramer merged 3 commits into
mainfrom
docs/dd061-performance-refresh

Conversation

@larimonious

@larimonious larimonious commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Refreshes DD-061 against the current v0.4.11 interpreter/runtime baseline.
  • Makes the first PR a template-system contract cleanup before optimization: explicit #if / #for, escaped-by-default {{expr}}, raw {{{expr}}}, partials, filter arg conventions, literal brace escaping, and consistent template error behavior.
  • Preserves existing app syntax and explicitly rejects ambiguous Mustache {{#key}}...{{/key}} sections for this cleanup slice.
  • Reframes the performance roadmap around current ntnt usage: server-rendered templates, dashboard/admin pages, article/list pages, JSON routes, and DB-backed handlers.
  • Reorders the implementation sequence: template contract cleanup, benchmark harness, automatic template() AST cache, template scope/loop cleanup, direct native/global call fast path, environment lookup instrumentation/cache, request/response allocation cleanup, then a measured deeper-interpreter decision.
  • Updates the design-doc registry README row.

Test Plan

  • git diff --check
  • PR sequence/key recommendation sanity script
  • Documentation-only change; no Rust/build tests run.

Review note

This is intentionally just a planning PR. If review flags major correctness or scope issues in the plan, we should fix those. Minor preference churn should wait for the implementation PRs so we do not relive the world's smallest procedural treadmill.

@greptile-apps

greptile-apps Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR refreshes DD-061 against the v0.4.11 baseline, replacing the original abstract four-layer performance theory with an eight-PR concrete sequence grounded in current source observations and real ntnt app workloads (server-rendered templates, admin dashboards, article/list pages, DB-backed handlers).

  • dd-061 is rewritten with source-backed baseline observations (template re-parse on every template() call, recursive HashMap environment lookup with cloning, growing call-dispatch special-case ladder, already-compiled route segments) and a sequenced PR plan: contract cleanup → benchmark harness → automatic AST cache → loop/scope cleanup → native-call fast path → lookup cache → allocation cleanup → decision gate.
  • README.md receives a one-row description update that accurately summarizes the new roadmap scope.

Confidence Score: 5/5

Documentation-only change with no Rust source, schema, or build configuration modifications; safe to merge.

Both files are design documents. The refreshed DD body is internally consistent: baseline observations match the named source files, the PR sequence builds logically (contract before cache, harness before implementation), and the prioritization table aligns with the prose. The status field reads in_review with no trailing modifier. No code paths, migrations, or public APIs are affected.

No files require special attention.

Important Files Changed

Filename Overview
design-docs/README.md Single-row update to the DD-061 description: replaces 'Interpreter-native performance roadmap' with a richer summary reflecting the new scoped roadmap. Change is accurate and consistent with the refreshed DD body.
design-docs/dd-061-interpreter-performance-roadmap.md Complete refresh of the performance roadmap against the v0.4.11 baseline. Replaces the abstract four-layer theory with eight concrete, sequenced PRs grounded in source observations. Status field is correctly in_review with no trailing modifier. Baseline observations, design principles, measurement plan, risk table, and prioritization table are internally consistent.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[PR 1: Template contract cleanup] --> B[PR 2: Benchmark harness]
    B --> C[PR 3: Automatic template AST cache]
    C --> D[PR 4: Template render scope/loop cleanup]
    D --> E[PR 5: Direct native/global call fast path]
    E --> F[PR 6: Environment lookup instrumentation/cache]
    F --> G[PR 7: Request/response allocation cleanup]
    G --> H[PR 8: Decision gate]
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A[PR 1: Template contract cleanup] --> B[PR 2: Benchmark harness]
    B --> C[PR 3: Automatic template AST cache]
    C --> D[PR 4: Template render scope/loop cleanup]
    D --> E[PR 5: Direct native/global call fast path]
    E --> F[PR 6: Environment lookup instrumentation/cache]
    F --> G[PR 7: Request/response allocation cleanup]
    G --> H[PR 8: Decision gate]
Loading

Reviews (3): Last reviewed commit: "docs: add template contract phase to DD-..." | Re-trigger Greptile

Comment thread design-docs/dd-061-interpreter-performance-roadmap.md
@joshcramer joshcramer merged commit bcd7a97 into main Jun 20, 2026
7 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.

2 participants