Skip to content

perf(routing): enforce or auto-enable compiled route snapshot for production hot path #75

Description

@ZhuchkaTriplesix

Context

Lock-free route matching depends on compiled snapshot (freeze()). If app is not frozen, request path still uses mutex-backed routers, reducing scalability.

Goal

Make compiled routing harder to miss in production.

Options

  • Auto-freeze/auto-compile on first request.
  • Strong runtime warning when serving without compiled routers.
  • Explicit config to enforce freeze-before-serve.

Acceptance criteria

  • Clear strategy implemented (auto-freeze or enforced guard).
  • Behavior documented in routing/perf docs.
  • No regressions in route registration lifecycle tests.

Notes

Prefer minimal surprise for existing users; avoid breaking dev ergonomics.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions