Skip to content

parallelized requests#33

Open
sskumar18 wants to merge 1 commit intovcon-dev:mainfrom
sskumar18:enhance/parallelization
Open

parallelized requests#33
sskumar18 wants to merge 1 commit intovcon-dev:mainfrom
sskumar18:enhance/parallelization

Conversation

@sskumar18
Copy link
Contributor

@sskumar18 sskumar18 commented Feb 25, 2026

This PR eliminates sequential await chains in hot paths across the codebase by replacing them with concurrent execution using Promise.all and Promise.allSettled. No behaviour changes — same data is returned, same error semantics are preserved.


Note

Medium Risk
Concurrency changes can alter timing/load characteristics (more simultaneous Supabase RPCs/writes) and may surface rate-limit/locking issues despite intended unchanged results.

Overview
Speeds up several hot paths by replacing sequential DB/plugin operations with concurrent execution via Promise.all/Promise.allSettled.

DatabaseInspector now fetches per-table counts/columns/indexes in parallel (and runs the major stats queries concurrently), and VConQueries parallelizes vCon sub-entity reads plus inserts dialog/analysis/attachments concurrently while allowing addDialog/addAnalysis/addAttachment to accept a caller-provided index to avoid SELECT MAX lookups during creation.

VConService.createBatch now runs creates concurrently with a p-limit cap of 10 in-flight operations, and PluginManager.shutdown shuts down plugins concurrently using Promise.allSettled.

Written by Cursor Bugbot for commit 8c6f832. Configure here.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

This is the final PR Bugbot will review for you during this billing cycle

Your free Bugbot reviews will reset on March 17

Details

Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

Comment @cursor review or bugbot run to trigger another review on this PR

this.plugins
.filter((p) => p.shutdown)
.map((p) => p.shutdown!())
);
Copy link

Choose a reason for hiding this comment

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

Plugin shutdown silently swallows all errors

Medium Severity

Promise.allSettled never rejects, and the settled results are completely discarded — meaning any plugin shutdown() rejection is silently swallowed with no logging. The original sequential loop propagated errors to the caller. While running all shutdowns concurrently is a good idea, the results need to be inspected and failures logged, otherwise production shutdown issues become invisible to operators.

Fix in Cursor Fix in Web

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