Skip to content

No benchmarks for YAML serialization or code generation (implementation plan Task 8.1 not started) #117

Open

Description

@matt-edmondson

What's missing

Plan: docs/implementation-plan.md L127–130. The same item appears in docs/design.md L236.

  • Task 8.1: Performance optimization
    • Add benchmarks for core operations
    • Optimize serialization/deserialization
    • Implement caching where appropriate

What exists today

Nothing. The repository has no BenchmarkDotNet reference, no benchmark project and no timing tests. The plan's optimisation and caching steps have no measurements to justify them.

Why it matters

The editor regenerates the preview on every AST change (Coder.Editor/CoderEditorApp.cs, the preview pane). The YAML serializer and deserializer walk the tree by hand. Without a baseline, a regression in either one, or a quadratic path in a generator, would go unnoticed until the editor feels slow. The plan's optimisation step can't start until there's something to measure.

Acceptance criteria

  • A benchmarks/Coder.Benchmarks project using BenchmarkDotNet. It lives under benchmarks/, following the org's naming convention so it isn't counted as a shipped deliverable.
  • Benchmarks for YamlSerializer.Serialize, YamlDeserializer.Deserialize and Generate for each of the 7 registered generators, run over a representative AST such as the test exemplar (Coder.Test/Languages/CompiledExemplar.cs).
  • Optimisation and caching (the plan's remaining bullets) come after this, and only where a benchmark shows a need. They are out of scope here.

Dependencies

None.

Activity

  1. matt-edmondson commented on Sep 28, 2026

    @matt-edmondson
    ContributorAuthor

    Triage

    • Category: Improvement (performance baseline; implementation plan Task 8.1)
    • Priority: Low. There's no reported slowness. It's preventative infrastructure, and nothing depends on it.
    • Area / suggested assignment: a new benchmarks/Coder.Benchmarks project covering YamlSerializer, YamlDeserializer and the 7 generators.
    • Duplicates: none in Coder. Other repositories in the org have benchmark projects (for example PreciseNumber, and Semantics's benchmark history), and those are useful templates for layout and CI wiring.
    • In progress: no open PR in Coder.

    Suggested next step: add the project under benchmarks/ as the org convention requires, reuse CompiledExemplar as the input AST, and record a first baseline. Leave optimisation and caching out, as the issue already says.


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions