Skip to content

Lazy KG loading with LRU eviction; O(shards) startup #135

Closed

Description

@jsam

load_all_knowledge_graphs loads every KG eagerly and scans all shards once per KG (O(KGs x shards)), with JSON WAL replay. With one KG per user, startup time and RSS grow with the total data of all users. Group shards by KG once, load on first access, evict idle KGs, and load in parallel.

Roadmap checkpoint — 2026-10-03

R02/R03 remain prerequisites for D08 (#187). Shard grouping already exists, but src/naming.rs:57 scans known KG names per shard; measure and replace that ownership lookup rather than only parallelizing eager loading. Implement lazy activation, lifetime pinning for active requests/subscriptions, bounded safe eviction and metadata-only startup. Avoid a per-request LRU mutex; pass warm-query/delta and cold-start/RSS gates.

Activity

  1. added this to the Ops & resources milestone on Oct 3, 2026
  2. added
    backendBackend/server related
    P1Required next for reliable reactive delivery and operations
    on Oct 3, 2026
  3. jsam commented on Oct 4, 2026

    @jsam
    ContributorAuthor

    Moved to the Engine production readiness milestone, the current focus (tracker #199). EN-13: fast restart and measured restart time (lazy loading, O(shards) startup).

    Roadmap per the neurosymbolic decision layer plan: engine production readiness first, then gateway neural integration with Jev, CLM and Laya (#266).

  4. jsam commented on Oct 5, 2026

    @jsam
    ContributorAuthor

    Done in #357 (merged): lazy graph activation and O(shards) startup.

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

    P1Required next for reliable reactive delivery and operationsbackendBackend/server related

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions