Skip to content

perf(resolve): resolve 500 refs per pool chunk - #610

Merged
bompus merged 3 commits into
fork/consolidatedfrom
perf/resolver-chunk-500
Nov 1, 2026
Merged

bompus merged 3 commits into
fork/consolidatedfrom
perf/resolver-chunk-500

Conversation

@bompus

@bompus bompus commented Nov 1, 2026

Copy link
Copy Markdown
Owner

What changed

  • CHUNK_SIZE 250 → 500 in the resolver pool, with the stale 250-era rationale replaced by the current measurements.
  • No output change: the chunk only controls how many refs a worker resolves per message; admission still settles in chunk order.

Measured

On the current head (fbda999f, includes #607–#609), 2 runs per arm, admission passed:

Corpus Base (250) 500 Change Resolution
n8n 51.80 s 50.75 s −2.0% 34.95 → 33.89 s
supabase 16.39 s 16.15 s −1.5% 10.62 → 10.33 s

An earlier probe at 723df837 measured n8n −3.7%, supabase −2.7%, discourse −1.2%; CPython was flat, and pretix showed no clear change across four runs per arm (8.69/8.68/8.86/7.97 vs 9.53/8.45/8.54/8.52 — the spreads overlap and the 9.53 outlier was a vendor-cluster straggler, not a repeatable regression). The 250 value was originally chosen for that pretix cluster; the current work-stealing queue no longer reproduces the tail.

Tests

  • Full npx vitest run: 958 files, 11,345 passed, 46 skipped, 0 failed.

README impact

The README measured-results table predates this change; n8n/supabase index times will move. Re-measuring the corpora is heavy and is recorded as a follow-up rather than hand-editing one row.

Re-measured on the current work-stealing pool: 500 beats 250 on n8n
(51.80 -> 50.75 s), supabase (16.39 -> 16.15 s) and discourse (14.56 ->
14.38 s); CPython is flat and pretix shows no clear change. The 250-era
vendor-JS cluster tail did not reproduce with the current queue. 125
bought ~1% on pretix for +300MB RSS; 250 stays the finer fallback.
@bompus bompus added the author:deepseek Pull request written by a deepseek model label Nov 1, 2026

@bompus-ai-review bompus-ai-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bompus AI Review (GPT-6.1 Terra, max reasoning): 1 finding(s).

Comment thread src/resolution/resolver-pool.ts Resolved
Review of #610: with CHUNK_SIZE=500, a page configured to 500 refs
enqueued one worker message, using one worker instead of the pool. Size
the chunk per page: 500 for large pages, and enough chunks (up to four,
capped by the pool size) that a small page still fans out. A unit test
pins the boundary.

@bompus-ai-review bompus-ai-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bompus AI Review (GPT-6.1 Terra, max reasoning): 1 finding(s).

Comment thread src/resolution/resolver-pool.ts Resolved
Review of #610: capping target chunks at four left a 3,000-ref
prerequisite page at six 500-ref chunks on a 12-worker pool, half the
workers idle. Size toward the 250-ref floor when 500s cannot fill the
pool: a 3,000-ref page gets twelve 250s; below 4x250 pages still split
finer. 40k pages keep 500.

@bompus-ai-review bompus-ai-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bompus AI Review (GPT-6.1 Terra, max reasoning): 0 finding(s).

Review 3: only high findings and above are posted from here on.

@bompus
bompus merged commit 3f5b77f into fork/consolidated Nov 1, 2026
@bompus
bompus deleted the perf/resolver-chunk-500 branch November 1, 2026 03:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author:deepseek Pull request written by a deepseek model

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant