MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / beginBulkEdgeLoad

Method beginBulkEdgeLoad

src/db/index.ts:420–424  ·  view source on GitHub ↗

* Enter bulk-edge-load mode: drop the non-unique edge indexes so the mass * INSERT OR IGNORE stream pays one B-tree (the identity index) instead of * five — measured 2.8s → 1.1s inserting a 224k-edge resolution set, with * recreation costing ~0.3s. MUST be paired with endBulkEdgeLoad(); a c

()

Source from the content-addressed store, hash-verified

418 * re-applies CREATE INDEX IF NOT EXISTS).
419 */
420 beginBulkEdgeLoad(): void {
421 for (const idx of DatabaseConnection.BULK_EDGE_INDEX_NAMES) {
422 this.db.exec(`DROP INDEX IF EXISTS ${idx}`);
423 }
424 }
425
426 /**
427 * Leave bulk-edge-load mode: recreate the dropped indexes in one pass each

Callers 5

beginBulkParseLoadMethod · 0.95
interruptedProjectFunction · 0.80

Calls 1

execMethod · 0.65

Tested by 2

interruptedProjectFunction · 0.64