@sigloch/graph-api-core 5.11.0 → 5.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -27,6 +27,13 @@ import { generateSchema } from './schema-generator.js';
|
|
|
27
27
|
* initialisieren, warten damit auf denselben Ladevorgang statt zwei zu starten.
|
|
28
28
|
*/
|
|
29
29
|
let kuzuModule = null;
|
|
30
|
+
/**
|
|
31
|
+
* Kuzu startet ohne Vorgabe einen Thread je Kern (ITEM-2026-1174). Der Node-Build ruft synchron,
|
|
32
|
+
* der JS-Thread steht also bis zur Antwort. Ein einzelner Graph braucht keine Parallelitaet:
|
|
33
|
+
* 600 Testlaeufe dauerten mit einem Thread 441 s, mit 18 Threads 726 s. Ob das auch den Haenger
|
|
34
|
+
* aus ITEM-2026-871 beseitigt, ist nicht belegt.
|
|
35
|
+
*/
|
|
36
|
+
const MAX_NUM_THREADS = 1;
|
|
30
37
|
function loadKuzu() {
|
|
31
38
|
if (!kuzuModule)
|
|
32
39
|
kuzuModule = initKuzu();
|
|
@@ -72,7 +79,7 @@ export class GraphCypherEngine {
|
|
|
72
79
|
}
|
|
73
80
|
await this.destroy();
|
|
74
81
|
this.kuzu = await loadKuzu();
|
|
75
|
-
this.db = new this.kuzu.Database(this.options.path ?? ':memory:');
|
|
82
|
+
this.db = new this.kuzu.Database(this.options.path ?? ':memory:', 0, MAX_NUM_THREADS);
|
|
76
83
|
this.connection = new this.kuzu.Connection(this.db);
|
|
77
84
|
this.schema = generateSchema(ontology, this.options);
|
|
78
85
|
this.ontology = ontology;
|