Skip to content

perf: index list fields for store/API/MCP listings (entry_list_values) #110

Closed

Description

@Madraka

Why: RFC-0042's 10,000-entry benchmark (#105, pnpm --filter @cloudhal/astro-renderer bench:lists) puts the store, API and MCP listing path above the threshold the RFC set (open question 10: more than 50 ms CPU or more than 10,000 rows read per list):

Path SQLite CPU Rows D1 CPU D1 rows
Today's scan, no where 53 ms 10,000 100 ms 10,002
queryContentEntries (store/API/MCP) 124 ms 10,001 176 ms 10,003
Snapshot per request (public site) 22 ms 0 21 ms 0

The public site is fine. Studio lists, GET /entries?where=… and MCP list_entries read the whole collection on every call.

Plan (RFC-0042 §4, "side table"):

  • An entry_list_values(site_id, entry_id, field, kind, num, text) table, written in the entry write batch (rule 4).
  • Only fields in a collection's listFields are indexed.
  • Expression indexes on (site_id, field, num) / (site_id, field, text).
  • queryContentEntries pushes where/orderBy/paging down to SQL and keeps the shared evaluator as the oracle.
  • Backfill as a resumable migration.
  • Field operations (rename, retype, remove) keep the table in step.

Done when: the benchmark's store path is under the threshold on sqlite and D1, results are identical to the in-memory evaluator (property test), and the existing suites pass.

Activity

  1. added a commit that references this issue on Oct 26, 2026
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