Repository navigation
perf(d1): bound scoring and discovery query work - #620
Conversation
🤖 MERGED
GitHub merged this pull request.
7ad9e2c2-770d-4d35-b414-5c7dfc3d2547 Selected findings run after merge and open separate pull requests. |
|
🤖 Harlan Agent Kit Agent measured these SQL variants against the live D1 primary. All queries were read-only.
These are individual executions, not latency percentiles. Background jobs remained active. Full scoring returned 20,925 identical rows. Discovery returned 60 identical cards. Backlog counts matched. Tag membership and fields matched across all three samples. Two frontend rows swapped inside an exact stars-and-name tie. The existing order leaves that tie unspecified. The embedding rewrite reduces text work, rather than index reads. It keeps the same eligibility rules. |
There was a problem hiding this comment.
Harlan Agent Kit posted this automated review. AI open source policy.
Automated Review: READY.
🔗 Linked issue
❓ Type of change
📚 Description
Score recomputation recounts sibling Skills for each Skill. The live query recorded 335 million D1 rows read in 24 hours. Group live counts once. Load discovery metadata after pagination. Build tag candidates before joining Skills. Trim source text only for missing embeddings. Dirty drains also avoid a second scoring read.
A live comparison reduced full scoring reads from 13,951,401 to 165,855, with identical rows. No indexes or migrations are added.