Skip to content

Reduce Startup time for Dev - #156

Open
Amar07Singh wants to merge 1 commit into
mainfrom
improvement/backend-startup-latency
Open

Amar07Singh wants to merge 1 commit into
mainfrom
improvement/backend-startup-latency

Conversation

@Amar07Singh

Copy link
Copy Markdown
Contributor

What changed
Replaced sequential for...of loops with Promise.allSettled() across all 3 Neo4j index functions. All CREATE ... IF NOT EXISTS Cypher statements are safe to parallelize — duplicate existence errors are caught per-statement and non-fatal failures are re-thrown after collecting all results.

Test
From ingestion-engine, run bun run knowledge-server or bun run admin-server and confirm Neo4j constraints/indexes are created without errors

…ureConceptGraphIndexes, ensureFlatFolderIndexes

- Replace sequential for...of loops with Promise.allSettled()
- All CREATE ... IF NOT EXISTS statements are idempotent and safe to parallelize
- Re-throw on actual failures after checking all settled results
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