You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
perf(db): migrate build pipeline writes to NativeDatabase (6.15) (#669)
* perf(db): add NativeDatabase napi-rs class for rusqlite connection lifecycle (6.13)
Foundation for moving all DB operations to rusqlite on the native engine
path. Creates a persistent rusqlite::Connection holder exposed to JS,
handling schema migrations and build metadata KV — eliminating redundant
per-call connection open/close in the native build pipeline.
* perf(db): migrate build pipeline writes to NativeDatabase persistent connection (6.15)
Consolidate all build-pipeline write operations into NativeDatabase
methods that reuse a single persistent rusqlite connection, eliminating
the per-call connection open/close overhead from the standalone functions.
Rust: Refactor standalone modules (insert_nodes, edges_db, ast_db,
roles_db) to expose pub(crate) functions accepting &Connection, then
add wrapper methods on NativeDatabase: bulkInsertNodes, bulkInsertEdges,
bulkInsertAstNodes, classifyRolesFull, classifyRolesIncremental, and
purgeFilesData. Standalone #[napi] functions preserved for backward
compatibility.
TypeScript: Wire all build stages (insert-nodes, build-edges,
build-structure, detect-changes, ast) to prefer ctx.nativeDb methods
when available, falling back to standalone native functions then JS.
Thread nativeDb through EngineOpts for analysis-phase AST insertion.
* fix: rename do_insert to do_insert_nodes and add error logging before .is_ok() (#669)
0 commit comments