Skip to content

Finish EACL v8 upgrade and restore Explorer performance - #5

Open
theronic wants to merge 5 commits into
mainfrom
agent/eacl-v8-performance-fix
Open

Finish EACL v8 upgrade and restore Explorer performance#5
theronic wants to merge 5 commits into
mainfrom
agent/eacl-v8-performance-fix

Conversation

@theronic

@theronic theronic commented Aug 6, 2026

Copy link
Copy Markdown
Owner

What changed

  • pins EACL and EACL DataScript to 8b17ee0bd931bd970d0c4a6cfd83fc4d0b49a0d2 from Restore EACL v8 enumeration performance eacl#104
  • adds Non-recursive and Recursive schema preset tabs while preserving the explicit Write Schema action
  • restores the cache toggle, Evict Cache action, native cache metrics, and HIT / MISS / CACHE DISABLED badges from the OpenSpec change
  • configures a bounded 32 MiB projection working set for the documented 50k–100k local benchmark workflow
  • stores query-driving state in the local DataScript UI entity so subject, permission, cache, schema, and seed changes invalidate stale asynchronous work coherently
  • resets root and nested cursor stacks after database mutations, preventing stale exact-snapshot cursor errors
  • preserves page cache provenance independently from background totals
  • includes the complete OpenSpec proposal, design, specs, and 32/32 completed tasks

Root cause

The main v8 count regression rebuilt the merged permission traversal per count window. The later cache-only regression came from the hidden subproblem projection tier: each LRU eviction scanned the complete tier, so a full cache plus relationship appends produced quadratic work and blocked the browser event loop. Public cursor transport and the :rebase? marker also leaked into completed page keys, causing false misses after unrelated UI transactions and subject switches.

The EACL fix uses an exact bounded access log for eviction and keys pages by the authenticated internal boundary. Explorer supplies a larger but still bounded projection budget for its benchmark-scale in-memory dataset.

Validation

  • Explorer CLJS: 62 tests / 307 assertions, zero failures/errors
  • Shadow app and test builds: zero warnings
  • OpenSpec strict validation: valid, 32/32 tasks complete
  • clean pinned browser run, seeded 10k then appended 40k with cache enabled:
    • cold 50k super-user count: 510.4ms (reported regression: 23,446.3ms)
    • page 2–5 cold misses: 73.5ms, 28.1ms, 13.6ms, 16.4ms
    • reverse revisits: HIT in 2.0–2.2ms
    • after switching subjects and back: pages 2–5 remain HIT, typically 5–6ms warmed
    • managed projection tier: ~3.0 MiB / 32 MiB, zero evictions
  • Recursive schema written at 50k: 620.0ms count; admin/view switching completes without a hang
  • EACL shared/DataScript CLJ: 242 tests / 8,237 assertions
  • EACL DataScript CLJS: 173 tests / 4,565 assertions
  • EACL Dafny: 219 verified obligations, zero errors\n- EACL public source closure: 62 roots / 1,473 definitions, verified

Depends on theronic/eacl#104.

@theronic
theronic marked this pull request as ready for review August 6, 2026 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant