• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

lsm / neokai / 25646971668 / 1
82%
dev: 82%

Build:
DEFAULT BRANCH: dev
Ran 11 May 2026 02:24AM UTC
Files 148
Run time 6s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

11 May 2026 02:22AM UTC coverage: 40.17% (-0.05%) from 40.224%
25646971668.1

push

github

web-flow
perf(daemon): index-targeted lookups for hot sdk_messages LiveQueries (#1855)

* perf(daemon): index-targeted lookups for hot sdk_messages LiveQueries

Three fixes on top of PR #1853:

1. getUserMessageByUuid: replace load-all-user-rows + JS scan with a single
   indexed lookup on (session_id, message_type, json_extract uuid). Used by
   the rewind handler on every checkpoint click.

2. SPACE_TASK_ACTIVITY_BY_TASK_SQL message_stats CTE: rewrite the GROUP BY
   join (which forced a full scan of idx_sdk_messages_session_id) as two
   correlated scalar subqueries over unique_session_ids so SQLite picks
   per-session index lookups instead.

3. SPACE_TASK_MESSAGES_BASE_CTE turnUserMessageId: replace the per-row
   correlated subquery (O(N x U)) with a MAX() OVER window function and a
   LEFT JOIN to user_row_starts. SQLite has no LAST_VALUE IGNORE NULLS so
   we carry rowPos as an integer surrogate and resolve back to the user
   message id via the join.

Benchmarked against ~/.neokai/data/daemon.db on 5 representative tasks
(3 runs each, warmup excluded):

| query        | task     | rows | before (ms) | after (ms) | speedup |
| ------------ | -------- | ---: | ----------: | ---------: | ------: |
| activity     | 9f7038f7 |    3 |       319.9 |        0.9 |  363x   |
| compact      | 9f7038f7 | 1537 |      1406.4 |      323.5 |   4.3x  |
| active-turn  | 9f7038f7 | 1421 |      1361.6 |      302.3 |   4.5x  |
| activity     | c1525ca4 |    2 |       289.5 |        0.7 |  413x   |
| compact      | c1525ca4 |  864 |      1981.6 |      418.6 |   4.7x  |
| active-turn  | c1525ca4 |  792 |      1878.0 |      423.7 |   4.4x  |
| activity     | 31ba3d09 |    1 |       292.6 |        0.7 |  418x   |
| compact      | 31ba3d09 |  728 |      1135.5 |      271.6 |   4.2x  |
| active-turn  | 31ba3d09 |  709 |      1098.1 |      256.4 |   4.3x  |
| activity     | 485f6fec |    1 |       280.8 |        0.8 |  351x   |
| compact      | 485f6fec |  812 |      1421.2 |   ... (continued)

14003 of 34859 relevant lines covered (40.17%)

22.07 hits per line

Source Files on job daemon-5-space-runtime - 25646971668.1
  • Tree
  • List 148
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 25646971668
  • a2a5f09b on github
  • Prev Job for on dev (#25646115400.10)
  • Next Job for on dev (#25647934416.10)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc