Skip to content

perf(exec): parallelize preferential_attachment on ComputePool (#512) - #609

Merged
DecisionNerd merged 1 commit into
mainfrom
cursor/512-parallel-preferential-attachment-c6a4
Aug 12, 2026
Merged

DecisionNerd merged 1 commit into
mainfrom
cursor/512-parallel-preferential-attachment-c6a4

Conversation

@DecisionNerd

@DecisionNerd DecisionNerd commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Implements #512: parallel preferential_attachment on ComputePool with measured crossover and fingerprint parity.

Closes #512

Open in Web Open in Cursor 

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Note

Parallelize preferential_attachment scoring on ComputePool above 262,144 work units

  • Adds a parallel execution path for preferential_attachment_scores in algorithm_rank.rs that partitions sources into canonical chunks and processes them concurrently on the instance-owned ComputePool.
  • Introduces select_preferential_attachment_path to choose serial vs. parallel based on thread count, pool availability, source count, and estimated work (sources + total neighbor count).
  • Serial path remains the default when threads ≤ 1, sources ≤ 1, estimated work < 262,144, or no pool is available; score values and row order are identical on both paths.
  • Worker panics during parallel execution are caught and returned as structured ExecutionError rather than unwinding past the pool boundary.
  • Behavioral Change: graphs with estimated work ≥ 262,144 and multiple configured threads now execute preferential attachment in parallel by default.

Macroscope summarized 328871e.

@coderabbitai

coderabbitai Bot commented Aug 10, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 48 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 60df305b-0797-45ac-8e03-db973f5e7f83

📥 Commits

Reviewing files that changed from the base of the PR and between 1acf5b0 and 328871e.

⛔ Files ignored due to path filters (2)
  • docs/book/architecture/algorithms.md is excluded by !**/*.md, !**/docs/**
  • docs/reference/api.md is excluded by !**/*.md, !**/docs/**
📒 Files selected for processing (2)
  • crates/graphforge-api/tests/m4_entry_baseline.rs
  • crates/graphforge-exec/src/algorithm_rank.rs

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added executor Changes to query executor core Core source code changes documentation Improvements or additions to documentation labels Aug 10, 2026
@blacksmith-sh

This comment has been minimized.

@DecisionNerd
DecisionNerd force-pushed the cursor/512-parallel-preferential-attachment-c6a4 branch from 030c489 to 221fdc0 Compare August 11, 2026 23:07
@DecisionNerd
DecisionNerd marked this pull request as ready for review August 11, 2026 23:17
@DecisionNerd
DecisionNerd force-pushed the cursor/512-parallel-preferential-attachment-c6a4 branch from 221fdc0 to 660fc84 Compare August 11, 2026 23:31
@DecisionNerd
DecisionNerd marked this pull request as draft August 12, 2026 01:05
@DecisionNerd
DecisionNerd force-pushed the cursor/512-parallel-preferential-attachment-c6a4 branch from 660fc84 to f054b9a Compare August 12, 2026 03:30
@github-actions github-actions Bot added testing Test coverage and testing infrastructure tooling Developer tooling and automation labels Aug 12, 2026
@DecisionNerd
DecisionNerd force-pushed the cursor/512-parallel-preferential-attachment-c6a4 branch from f054b9a to d389534 Compare August 12, 2026 03:37
Unblocks tip CI: drop duplicate AnalyzeOptions import and correct the
short-matrix length assert after maximum-spanning-tree landed.

Co-authored-by: Cursor <cursoragent@cursor.com>
@DecisionNerd
DecisionNerd force-pushed the cursor/512-parallel-preferential-attachment-c6a4 branch from d389534 to 328871e Compare August 12, 2026 04:06
@DecisionNerd
DecisionNerd marked this pull request as ready for review August 12, 2026 04:16
@DecisionNerd
DecisionNerd merged commit 7ee8ae4 into main Aug 12, 2026
21 checks passed
@DecisionNerd
DecisionNerd deleted the cursor/512-parallel-preferential-attachment-c6a4 branch August 13, 2026 02:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Core source code changes documentation Improvements or additions to documentation executor Changes to query executor testing Test coverage and testing infrastructure tooling Developer tooling and automation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

perf(exec): polish scale/performance for rank(by="preferential_attachment")

1 participant