Skip to content

[EXT] registerBuiltinExtensions() runs on every CLI invocation — consider lazy loading #266

@flyingrobots

Description

@flyingrobots

Problem

bin/git-mind.js calls registerBuiltinExtensions() at the top level on every invocation — including commands that don't need extensions at all (git mind init, git mind link, git mind process-commit, etc.).

This reads two YAML files from disk and validates them through AJV on every call. Currently fast enough to ignore, but worth flagging as the extension count grows.

Options

  1. Lazy load: only call registerBuiltinExtensions() when an extension-aware command is running (view, extension list, etc.)
  2. Keep eager but cache: if the files haven't changed (check mtime), skip revalidation
  3. Do nothing: startup cost is negligible at 2 manifests

Label as tech-debt to revisit at scale.

Ref: #252

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions