@bldrs-ai/conway 0.12.800 → 0.14.835

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.
@@ -463,6 +463,16 @@ export declare class IfcGeometryExtraction {
463
463
  * @return {Float32Array}
464
464
  */
465
465
  flattenPointsToFloat64Array(points: IfcCartesianPoint[], dimensions: number): Float64Array;
466
+ /**
467
+ * Efficiently flatten the points into a Float64Array while skipping
468
+ * consecutive points with the same localID.
469
+ *
470
+ * @param points - Array of IfcCartesianPoint
471
+ * @param dimensions - Number of coordinates per point (e.g. 3 for x,y,z)
472
+ * @param reverse - reverse the points order
473
+ * @return {Float64Array}
474
+ */
475
+ flattenCartesianPointsToFloat64ArrayFiltered(points: IfcCartesianPoint[], dimensions: number): Float64Array;
466
476
  /**
467
477
  *
468
478
  * @param from
@@ -1 +1 @@
1
- {"version":3,"file":"ifc_geometry_extraction.d.ts","sourceRoot":"","sources":["../../../src/ifc/ifc_geometry_extraction.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EAGd,cAAc,EACd,sBAAsB,EAEtB,OAAO,EAGP,WAAW,EASX,wBAAwB,EAMxB,aAAa,EAGb,SAAS,EACT,sBAAsB,EAEtB,cAAc,EACd,iBAAiB,EAcjB,kBAAkB,EAEnB,MAAM,gCAAgC,CAAA;AACvC,OAAO,EAAqB,SAAS,EAAuB,MAAM,4BAA4B,CAAA;AAE9F,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AAE5D,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,mBAAmB,EAEnB,oBAAoB,EACpB,8BAA8B,EAC9B,mBAAmB,EACnB,mBAAmB,EACnB,gCAAgC,EAChC,mBAAmB,EACnB,mBAAmB,EACnB,UAAU,EACX,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AACxD,OAAO,EAEL,mBAAmB,EACnB,mBAAmB,EACnB,gB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ACH,8BAA8B;IAiB9B;;OAEG;IACH,mBAAmB;IAqBnB;;OAEG;IACH,0BAA0B;IAoD1B;;;;OAIG;IACH,aAAa,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,GAAG,IAAI;IAyCjD;;;;OAIG;IACH,YAAY,CAAC,cAAc,EAAC,MAAM,EAAE,QAAQ,EAAC,cAAc;IAU3D;;;;;;;OAOG;IACH,sBAAsB,IACpB;QAAC,aAAa;QAAE,eAAe;KAAC;CA6ZnC"}
1
+ {"version":3,"file":"ifc_geometry_extraction.d.ts","sourceRoot":"","sources":["../../../src/ifc/ifc_geometry_extraction.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EAGd,cAAc,EACd,sBAAsB,EAEtB,OAAO,EAGP,WAAW,EASX,wBAAwB,EAMxB,aAAa,EAGb,SAAS,EACT,sBAAsB,EAEtB,cAAc,EACd,iBAAiB,EAcjB,kBAAkB,EAEnB,MAAM,gCAAgC,CAAA;AACvC,OAAO,EAAqB,SAAS,EAAuB,MAAM,4BAA4B,CAAA;AAE9F,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AAE5D,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,mBAAmB,EAEnB,oBAAoB,EACpB,8BAA8B,EAC9B,mBAAmB,EACnB,mBAAmB,EACnB,gCAAgC,EAChC,mBAAmB,EACnB,mBAAmB,EACnB,UAAU,EACX,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AACxD,OAAO,EAEL,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAGhB,oCAAoC,EACpC,mBAAmB,EACnB,YAAY,EAEZ,YAAY,EACZ,oBAAoB,EAEpB,mBAAmB,EAGnB,aAAa,EACb,yBAAyB,EACzB,kBAAkB,EAGlB,mBAAmB,EACnB,UAAU,EAEV,aAAa,EACb,qBAAqB,EAErB,mBAAmB,EACnB,oBAAoB,EACpB,aAAa,EACb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AG,MAAM,GAAG,IAAI;IAyCjD;;;;OAIG;IACH,YAAY,CAAC,cAAc,EAAC,MAAM,EAAE,QAAQ,EAAC,cAAc;IAU3D;;;;;;;OAOG;IACH,sBAAsB,IACpB;QAAC,aAAa;QAAE,eAAe;KAAC;CA6ZnC"}
@@ -497,10 +497,10 @@ export class IfcGeometryExtraction {
497
497
  const geometry = conwayModel.nativeGeometry();
498
498
  const coordParseBuffer = conwayModel.nativeParseBuffer();
499
499
  const faceParseBuffer = conwayModel.nativeParseBuffer();
500
- if (!entity.Coordinates.extractParseBuffer(0, coordParseBuffer, this.wasmModule.HEAPU8, true)) {
500
+ if (!entity.Coordinates.extractParseBuffer(0, coordParseBuffer, this.wasmModule, true)) {
501
501
  coordParseBuffer.resize(0);
502
502
  }
503
- if (!entity.extractParseBuffer(3, faceParseBuffer, this.wasmModule.HEAPU8, true)) {
503
+ if (!entity.extractParseBuffer(3, faceParseBuffer, this.wasmModule, true)) {
504
504
  faceParseBuffer.resize(0);
505
505
  }
506
506
  geometry.extractVerticesAndTriangles(coordParseBuffer, faceParseBuffer);
@@ -570,7 +570,7 @@ export class IfcGeometryExtraction {
570
570
  const startIndicesBufferOffsetsArrayPtr = this.arrayToWasmHeap(startIndicesBufferOffsetsArray);
571
571
  const polygonalFaceVector = this.wasmModule.buildIndexedPolygonalFaceVector(indicesArrayPtr, indicesArray.length, startIndicesArrayPtr, polygonalFaceBufferOffsetsArrayPtr, polygonalFaceBufferOffsets.length, startIndicesBufferOffsetsArrayPtr, startIndicesBufferOffsets.length);
572
572
  const pointsParseBuffer = this.conwayModel.nativeParseBuffer();
573
- if (!entity.Coordinates.extractParseBuffer(0, pointsParseBuffer, this.wasmModule.HEAPU8, true)) {
573
+ if (!entity.Coordinates.extractParseBuffer(0, pointsParseBuffer, this.wasmModule, true)) {
574
574
  pointsParseBuffer.resize(0);
575
575
  }
576
576
  const pointsArrayNative = this.wasmModule.parseVertexVector(pointsParseBuffer);
@@ -2417,6 +2417,41 @@ export class IfcGeometryExtraction {
2417
2417
  });
2418
2418
  return flatCoordinates;
2419
2419
  }
2420
+ /**
2421
+ * Efficiently flatten the points into a Float64Array while skipping
2422
+ * consecutive points with the same localID.
2423
+ *
2424
+ * @param points - Array of IfcCartesianPoint
2425
+ * @param dimensions - Number of coordinates per point (e.g. 3 for x,y,z)
2426
+ * @param reverse - reverse the points order
2427
+ * @return {Float64Array}
2428
+ */
2429
+ flattenCartesianPointsToFloat64ArrayFiltered(points, dimensions) {
2430
+ // 1) First pass: figure out how many points *actually* get included
2431
+ // (skipping consecutive duplicates by localID)
2432
+ let uniqueCount = 0;
2433
+ for (let i = 0; i < points.length; i++) {
2434
+ if (i === 0 || points[i].localID !== points[i - 1].localID) {
2435
+ uniqueCount++;
2436
+ }
2437
+ }
2438
+ // 2) Knowing how many we'll include, allocate the final TypedArray
2439
+ const totalCoordinates = uniqueCount * dimensions;
2440
+ const flatCoordinates = new Float64Array(totalCoordinates);
2441
+ // 3) Second pass: populate flatCoordinates
2442
+ let offset = 0;
2443
+ let prevLocalID = -1;
2444
+ for (let i = 0; i < points.length; i++) {
2445
+ const point = points[i];
2446
+ if (i === 0 || point.localID !== prevLocalID) {
2447
+ // Copy only if localID changed
2448
+ flatCoordinates.set(point.Coordinates, offset);
2449
+ offset += point.Coordinates.length; // or offset += dimensions if all are guaranteed
2450
+ prevLocalID = point.localID;
2451
+ }
2452
+ }
2453
+ return flatCoordinates;
2454
+ }
2420
2455
  /**
2421
2456
  *
2422
2457
  * @param from
@@ -2615,7 +2650,7 @@ export class IfcGeometryExtraction {
2615
2650
  const parseBuffer = this.conwayModel.nativeParseBuffer();
2616
2651
  let indexArray;
2617
2652
  try {
2618
- if (!localSegment.extractParseBuffer(0, parseBuffer, this.wasmModule.HEAPU8, true)) {
2653
+ if (!localSegment.extractParseBuffer(0, parseBuffer, this.wasmModule, true)) {
2619
2654
  parseBuffer.resize(0);
2620
2655
  }
2621
2656
  indexArray = this.wasmModule.parseUint32Vector(parseBuffer);
@@ -2639,7 +2674,7 @@ export class IfcGeometryExtraction {
2639
2674
  // = this.nativeVectorGlmdVec2((fromPoints as any).CoordList.length)
2640
2675
  const parseBuffer = this.conwayModel.nativeParseBuffer();
2641
2676
  try {
2642
- if (!fromPoints.extractParseBuffer(0, parseBuffer, this.wasmModule.HEAPU8, true)) {
2677
+ if (!fromPoints.extractParseBuffer(0, parseBuffer, this.wasmModule, true)) {
2643
2678
  parseBuffer.resize(0);
2644
2679
  }
2645
2680
  if (fromPoints instanceof IfcCartesianPointList2D) { // ||
@@ -3080,11 +3115,11 @@ export class IfcGeometryExtraction {
3080
3115
  if (innerBound instanceof IfcPolyLoop) {
3081
3116
  // let prevLocalID: number = -1
3082
3117
  const coordParseBuffer = conwayModel.nativeParseBuffer();
3083
- if (!innerBound.extractParseBuffer(0, coordParseBuffer, this.wasmModule.HEAPU8, true)) {
3118
+ if (!innerBound.extractParseBuffer(0, coordParseBuffer, this.wasmModule, true)) {
3084
3119
  coordParseBuffer.resize(0);
3085
3120
  }
3086
3121
  vec3Array = this.wasmModule.parseVertexVector(coordParseBuffer);
3087
- this.wasmModule.freeParseBuffer(coordParseBuffer);
3122
+ conwayModel.freeParseBuffer(coordParseBuffer);
3088
3123
  }
3089
3124
  else if (innerBound instanceof IfcEdgeLoop) {
3090
3125
  vec3Array = this.nativeVectorGlmdVec3();
@@ -3367,40 +3402,15 @@ export class IfcGeometryExtraction {
3367
3402
  if (from.Bounds.length > 0) {
3368
3403
  const bound3DVector = this.nativeBound3DVector();
3369
3404
  for (let boundIndex = 0; boundIndex < from.Bounds.length; ++boundIndex) {
3370
- const vec3Array = this.nativeVectorGlmdVec3();
3371
3405
  const bound = from.Bounds[boundIndex];
3372
- if (bound.Bound instanceof IfcPolyLoop) {
3373
- let prevLocalID = -1;
3374
- for (let pointIndex = 0; pointIndex < bound.Bound.Polygon.length; ++pointIndex) {
3375
- const vec3 = {
3376
- x: bound.Bound.Polygon[pointIndex].Coordinates[0],
3377
- y: bound.Bound.Polygon[pointIndex].Coordinates[1],
3378
- z: bound.Bound.Polygon[pointIndex].Coordinates[2],
3379
- };
3380
- const currentLocalID = bound.Bound.Polygon[pointIndex].localID;
3381
- if (currentLocalID !== prevLocalID) {
3382
- vec3Array.push_back(vec3);
3383
- prevLocalID = currentLocalID;
3384
- }
3385
- }
3406
+ const innerBound = bound.Bound;
3407
+ if (innerBound instanceof IfcPolyLoop) {
3408
+ const pointsFlattened = this.flattenCartesianPointsToFloat64ArrayFiltered(innerBound.Polygon, 3);
3409
+ const pointsPtr = this.arrayToWasmHeap(pointsFlattened);
3410
+ const bound3D = this.wasmModule.createSimpleBound3D(pointsPtr, pointsFlattened.length, bound.Orientation, (bound.type === EntityTypesIfc.IFCFACEOUTERBOUND) ? 0 : 1);
3411
+ bound3DVector.push_back(bound3D);
3412
+ this.wasmModule._free(pointsPtr);
3386
3413
  }
3387
- const edgesDummy = this.nativeVectorCurve();
3388
- // get curve
3389
- const parameters = {
3390
- points: vec3Array,
3391
- edges: edgesDummy,
3392
- };
3393
- const curve = this.conwayModel.getLoop(parameters);
3394
- // create bound vector
3395
- const parametersCreateBounds3D = {
3396
- curve: curve,
3397
- orientation: bound.Orientation,
3398
- type: (bound.type === EntityTypesIfc.IFCFACEOUTERBOUND) ? 0 : 1,
3399
- };
3400
- const bound3D = this.conwayModel.createBound3D(parametersCreateBounds3D);
3401
- bound3DVector.push_back(bound3D);
3402
- vec3Array.delete();
3403
- edgesDummy.delete();
3404
3414
  }
3405
3415
  // add face to geometry
3406
3416
  const defaultSurface = (new (this.wasmModule.IfcSurface));
@@ -5,36 +5,63 @@ import childProcess from 'child_process';
5
5
  import { promisify } from 'util';
6
6
  import path from 'path';
7
7
  import crypto from 'crypto';
8
+ import os from 'os';
9
+ import pLimit from 'p-limit';
8
10
  const errorCSVHeader = 'message,count,expressids,file';
9
11
  const exec = promisify(childProcess.exec);
12
+ /* eslint-disable require-await */
10
13
  /**
11
- * Safe execute a process command
14
+ * Safe execute a process command with cancellation support.
12
15
  *
13
- * @param command The command to run
14
- * @return {ExecException | { type: 'Success', stdout: string, stderr: string }}
16
+ * @param command The command to run.
17
+ * @param timeoutMs Number of milliseconds to wait before timing out.
18
+ * @return {Promise<RunErrorResults | { type: 'Success', stdout: string, stderr: string }>}
15
19
  */
16
- async function safeExec(command) {
17
- try {
18
- const result = await exec(command, { maxBuffer: STD_OUT_ERR_MAX_BUFFER });
19
- return {
20
- type: 'Success',
21
- stdout: result.stdout,
22
- stderr: result.stderr,
23
- };
24
- }
25
- catch (err) {
26
- const errResult = err;
27
- return {
28
- type: 'Failed',
29
- name: errResult.name,
30
- message: errResult.message,
31
- code: errResult.code,
32
- cmd: errResult.cmd,
33
- signal: errResult.signal,
34
- killed: errResult.killed,
35
- };
36
- }
20
+ async function safeExecWithCancellation(command, timeoutMs) {
21
+ return new Promise((resolve) => {
22
+ // Start the child process using childProcess.exec
23
+ const child = childProcess.exec(command, { maxBuffer: STD_OUT_ERR_MAX_BUFFER }, (err, stdout, stderr) => {
24
+ // If the process finishes before the timeout, clear the timer...
25
+ clearTimeout(timeoutHandle);
26
+ if (err) {
27
+ const errResult = err;
28
+ resolve({
29
+ type: 'Failed',
30
+ name: errResult.name,
31
+ message: errResult.message,
32
+ code: errResult.code,
33
+ cmd: errResult.cmd,
34
+ signal: errResult.signal,
35
+ killed: errResult.killed,
36
+ });
37
+ }
38
+ else {
39
+ resolve({
40
+ type: 'Success',
41
+ stdout,
42
+ stderr,
43
+ });
44
+ }
45
+ });
46
+ // Set up the timeout promise.
47
+ const timeoutHandle = setTimeout(() => {
48
+ // Timeout occurred: kill the child process.
49
+ child.kill();
50
+ resolve({
51
+ type: 'Failed',
52
+ name: 'TimeoutError',
53
+ message: 'Execution timed out',
54
+ cmd: command,
55
+ killed: true,
56
+ });
57
+ }, timeoutMs);
58
+ // When the child exits naturally, clear the timeout.
59
+ child.on('exit', () => {
60
+ clearTimeout(timeoutHandle);
61
+ });
62
+ });
37
63
  }
64
+ /* eslint-enable require-await */
38
65
  const SKIP_PARAMS = 2;
39
66
  // eslint-disable-next-line no-magic-numbers
40
67
  const STD_OUT_ERR_MAX_BUFFER = 64 * 1024 * 1024;
@@ -76,40 +103,43 @@ function csvSafeStringFileNames(from) {
76
103
  /**
77
104
  * Run the git diff
78
105
  *
79
- * @param outputFolder
80
- * @param target
81
- * @param diffOutputPath
82
- * @param isDryRun
106
+ * @param ifcFolder The folder we want to `cd` into before running git
107
+ * @param outputFolder The folder containing outputs that we compare
108
+ * @param target The Git diff target (branch, commit, etc.)
109
+ * @param diffOutputPath Where we store the CSV diff results (no extension)
110
+ * @param isDryRun If true, reverts changes via git checkout after diff
83
111
  */
84
- async function runDiff(outputFolder, target, diffOutputPath, isDryRun) {
112
+ async function runDiff(ifcFolder, outputFolder, target, diffOutputPath, isDryRun) {
85
113
  const diffOutputFolder = path.dirname(path.resolve(diffOutputPath));
86
114
  await fsPromises.mkdir(diffOutputFolder, { recursive: true });
87
- const process = await exec(`git diff -r --numstat --minimal ${target} -- ${outputFolder}`, { maxBuffer: STD_OUT_ERR_MAX_BUFFER });
88
- const csvDiff = `Added,Removed,File\n${process.stdout.split('\n').map((line) => line.split('\t').map(csvSafeStringFileNames).join(',')).join('\n')}`;
115
+ console.log(`ifcFolder: ${ifcFolder}`);
116
+ // 1) Change `cwd` to `ifcFolder`, so we "cd ifcFolder" before running git
117
+ const processResult = await exec(`git diff -r --numstat --minimal ${target} -- ${outputFolder}`, {
118
+ maxBuffer: STD_OUT_ERR_MAX_BUFFER,
119
+ cwd: ifcFolder, // <-- This causes the exec to run in ifcFolder
120
+ });
121
+ const csvDiff = `Added,Removed,File\n${processResult.stdout
122
+ .split('\n')
123
+ .map((line) => line.split('\t').map(csvSafeStringFileNames).join(','))
124
+ .join('\n')}`;
89
125
  await fsPromises.writeFile(`${diffOutputPath}.csv`, csvDiff);
90
126
  if (isDryRun) {
91
- await exec(`git checkout -- "${outputFolder}"`);
127
+ // 2) Also run the checkout in the same `cwd` context
128
+ await exec(`git checkout -- "${outputFolder}"`, { cwd: ifcFolder });
92
129
  }
93
130
  }
94
131
  let totalTime = 0; // To keep track of the running total time
95
132
  /**
96
133
  * Run a regression test digest for a file.
97
134
  */
98
- async function runForFile(filePath, outputPath) {
99
- const MAX_TIMEOUT_MS = 180000; // 3 minutes
135
+ async function runForFile(filePath, outputPath, maxTimeout) {
136
+ const MAX_TIMEOUT_MS = maxTimeout;
100
137
  const startTime = Date.now(); // Start time
101
138
  // eslint-disable-next-line max-len
102
139
  const safeExecCommand = `node --experimental-specifier-resolution=node ./compiled/src/ifc/ifc_regression_main.js -d "${filePath}" "${outputPath}"`;
103
140
  console.log(`Current File: ${filePath}`);
104
- const processPromise = safeExec(safeExecCommand);
105
- const timeoutPromise = new Promise((resolve) => setTimeout(() => {
106
- resolve({
107
- type: 'Failed',
108
- message: 'Execution timed out',
109
- name: '',
110
- });
111
- }, MAX_TIMEOUT_MS));
112
- const process = await Promise.race([processPromise, timeoutPromise]);
141
+ // Use safeExecWithCancellation, will kill the process if it takes longer than MAX_TIMEOUT_MS.
142
+ const process = await safeExecWithCancellation(safeExecCommand, MAX_TIMEOUT_MS);
113
143
  totalTime += Date.now() - startTime;
114
144
  console.log(`totalTime: ${totalTime}`);
115
145
  if (process.type === 'Failed') {
@@ -144,8 +174,122 @@ async function runForFile(filePath, outputPath) {
144
174
  hash: fileHash,
145
175
  };
146
176
  }
147
- const args = // eslint-disable-line no-unused-vars
148
- yargs(process.argv.slice(SKIP_PARAMS))
177
+ /**
178
+ * Recursively collect all IFC file paths (instead of processing them immediately).
179
+ */
180
+ async function collectIFCFiles(parentPath, excludeRegex) {
181
+ const ifcFiles = [];
182
+ /**
183
+ * Recursively walk ifc files
184
+ */
185
+ // eslint-disable-next-line no-shadow, require-jsdoc
186
+ async function recursiveWalk(currentPath) {
187
+ const items = await fsPromises.readdir(currentPath, { withFileTypes: true });
188
+ items.sort((a, b) => (a.name > b.name ? 1 : -1));
189
+ for (const item of items) {
190
+ const resolved = path.join(currentPath, item.name);
191
+ if (excludeRegex && excludeRegex.test(resolved)) {
192
+ continue;
193
+ }
194
+ if (item.isDirectory()) {
195
+ await recursiveWalk(resolved);
196
+ }
197
+ else if (path.extname(resolved).toLowerCase() === '.ifc') {
198
+ ifcFiles.push(resolved);
199
+ }
200
+ }
201
+ }
202
+ await recursiveWalk(parentPath);
203
+ return ifcFiles;
204
+ }
205
+ /**
206
+ * @return {number} percentage of memory used on machine
207
+ */
208
+ function getSystemMemoryUsagePercent() {
209
+ const total = os.totalmem(); // total system memory in bytes
210
+ const free = os.freemem(); // free system memory in bytes
211
+ const used = total - free;
212
+ /* eslint-disable no-magic-numbers */
213
+ console.log(`total: ${total / 1000 / 1000 / 1000} GB - ` +
214
+ `used: ${used / 1000 / 1000 / 1000} GB - ` +
215
+ `free: ${free / 1000 / 1000 / 1000} GB`);
216
+ return (used / total) * 100;
217
+ /* eslint-enable no-magic-numbers */
218
+ }
219
+ /**
220
+ * Parallel processing, using p-limit to limit concurrency to number of CPU cores.
221
+ */
222
+ async function processIFCFilesInParallel(ifcFiles, outputPath, errorLines, fileLines, failedLines, memUtilization, maxTimeout) {
223
+ const concurrencyLimit = os.cpus().length;
224
+ console.log(`Concurrency: ${concurrencyLimit} threads - Max Timeout: ${maxTimeout} ms`);
225
+ const limit = pLimit(concurrencyLimit);
226
+ const taskTimeout = 2000;
227
+ let activeTasks = 0;
228
+ // Create an array of task promises using map (without awaiting immediately)
229
+ const tasks = ifcFiles.map((ifcPath) => limit(async () => {
230
+ // Wait if system memory usage is above 95%
231
+ while (getSystemMemoryUsagePercent() > memUtilization) {
232
+ console.log(`Memory usage > ${memUtilization}%, waiting 2s...`);
233
+ await new Promise((resolve) => setTimeout(resolve, taskTimeout));
234
+ }
235
+ activeTasks++;
236
+ console.log(`Starting task for "${path.basename(ifcPath)}". Active tasks: ${activeTasks}`);
237
+ const fileResults = await runForFile(ifcPath, path.join(outputPath, path.basename(ifcPath, '.ifc')), maxTimeout);
238
+ activeTasks--;
239
+ console.log(`Completed task for "${path.basename(ifcPath)}". Active tasks: ${activeTasks}`);
240
+ return { ifcPath, fileResults };
241
+ }));
242
+ // Wait for all tasks to complete in parallel
243
+ const results = await Promise.all(tasks);
244
+ // Aggregate results
245
+ for (const { ifcPath, fileResults } of results) {
246
+ if (fileResults.type === 'Run') {
247
+ if (fileResults.errorLines) {
248
+ errorLines.push(...fileResults.errorLines);
249
+ }
250
+ fileLines.push(`${csvSafeString(path.basename(ifcPath))},` +
251
+ `${csvSafeString(fileResults.hash ?? '')},` +
252
+ `${fileResults.errorLines?.length ?? 0}\n`);
253
+ }
254
+ else {
255
+ // it's 'Failed'
256
+ failedLines.push(`${csvSafeString(path.basename(ifcPath))},` +
257
+ `${csvSafeString(fileResults.code?.toString() ?? '')},` +
258
+ `${csvSafeString(fileResults.signal ?? '')}\n`);
259
+ }
260
+ }
261
+ }
262
+ // The original recursive approach (unchanged, except it won't be used if -parallel is set)
263
+ /**
264
+ *
265
+ */
266
+ async function recursiveWalk(parentPath, excludeRegex, outputPath, errorLines, fileLines, failedLines, maxTimeout) {
267
+ const items = await fsPromises.readdir(parentPath, { withFileTypes: true });
268
+ items.sort((a, b) => (a.name > b.name ? 1 : -1));
269
+ for (const item of items) {
270
+ const resolved = path.join(parentPath, item.name);
271
+ if (excludeRegex && excludeRegex.test(resolved)) {
272
+ continue;
273
+ }
274
+ if (item.isDirectory()) {
275
+ await recursiveWalk(resolved, excludeRegex, outputPath, errorLines, fileLines, failedLines, maxTimeout);
276
+ }
277
+ else if (path.extname(resolved).toLowerCase() === '.ifc') {
278
+ const fileResults = await runForFile(resolved, path.join(outputPath, path.basename(resolved, '.ifc')), maxTimeout);
279
+ if (fileResults.type === 'Run') {
280
+ if (fileResults.errorLines !== void 0) {
281
+ errorLines.push(...fileResults.errorLines);
282
+ }
283
+ fileLines.push(`${csvSafeString(path.basename(resolved))},${csvSafeString(fileResults.hash ?? '')},${fileResults.errorLines?.length ?? 0}\n`);
284
+ }
285
+ else {
286
+ failedLines.push(`${csvSafeString(path.basename(resolved))},${csvSafeString(fileResults.code?.toString() ?? '')},${csvSafeString(fileResults.signal ?? '')}\n`);
287
+ }
288
+ }
289
+ }
290
+ }
291
+ // eslint-disable-next-line no-unused-vars
292
+ const args = yargs(process.argv.slice(SKIP_PARAMS))
149
293
  .command('$0 <model_folder> <output_folder>', 'Regression test', (yargs2) => {
150
294
  yargs2.option('target', {
151
295
  describe: 'Git diff target',
@@ -160,34 +304,70 @@ const args = // eslint-disable-line no-unused-vars
160
304
  default: false,
161
305
  });
162
306
  yargs2.option('changes', {
163
- describe: 'Custom output location for the diff output (filepath, should include ' +
164
- 'file name but not extension, the folder will be created if it doesn\'t exist',
307
+ describe:
308
+ // eslint-disable-next-line max-len
309
+ 'Custom output location for the diff output (filepath, should include file name but not extension, the folder will be created if it doesn\'t exist)',
165
310
  type: 'string',
166
311
  alias: 'c',
167
312
  default: '',
168
313
  });
169
314
  yargs2.option('exclude', {
170
- describe: 'An file-path exclusion regex filter (javascript syntax)',
315
+ describe: 'A file-path exclusion regex filter (javascript syntax)',
171
316
  type: 'string',
172
317
  alias: 'e',
173
318
  default: '',
174
319
  });
320
+ yargs2.option('parallel', {
321
+ describe: 'Process IFC files in parallel (limited by CPU cores)',
322
+ type: 'boolean',
323
+ alias: 'p',
324
+ default: false,
325
+ });
326
+ // only relevant if parallel is enabled
327
+ yargs2.option('mem-utilization', {
328
+ // eslint-disable-next-line max-len
329
+ describe: 'Memory utilization threshold percentage for parallel processing (1-100, default: 95)',
330
+ type: 'number',
331
+ alias: 'm',
332
+ default: 95,
333
+ });
334
+ // Validate mem-utilization only if parallel mode is active
335
+ yargs2.check((argv) => {
336
+ if (argv.parallel) {
337
+ const memUtil = argv['mem-utilization'];
338
+ // eslint-disable-next-line no-magic-numbers
339
+ if (typeof memUtil !== 'number' || memUtil < 1 || memUtil > 100) {
340
+ throw new Error('mem-utilization must be a number between 1 and 100');
341
+ }
342
+ }
343
+ return true;
344
+ });
345
+ yargs2.option('timeout', {
346
+ describe: 'IFC per-file loading timeout in ms (default: 150000)',
347
+ type: 'number',
348
+ alias: 'timeout',
349
+ default: 150000,
350
+ });
175
351
  yargs2.positional('model_folder', {
176
- describe: 'The folder containing IFC files, which will be walked recursively',
177
- type: 'string'
352
+ describe: 'Folder containing IFC files, recursively walked',
353
+ type: 'string',
178
354
  });
179
355
  yargs2.positional('output_folder', {
180
- // eslint-disable-next-line max-len
181
- describe: 'The folder is where manifests and output artefacts, with the potential exception of changes/diff output',
182
- type: 'string'
356
+ describe: 'Folder for manifests/output artifacts (diff CSV goes here unless overridden)',
357
+ type: 'string',
183
358
  });
184
359
  }, async (argv) => {
360
+ // ---- New: record overall start time
361
+ const overallStart = Date.now();
185
362
  const ifcFolder = argv['model_folder'];
186
363
  const outputPath = argv['output_folder'];
187
364
  let changes = argv['changes'] ?? '';
188
365
  const target = argv['target'] ?? '';
189
366
  const dryRun = argv['dryrun'] ?? false;
190
367
  const excludeFilter = argv['exclude'] ?? '';
368
+ const doParallel = argv['parallel'] ?? false; // <--- read the parallel flag
369
+ const memUtilization = argv['mem-utilization'];
370
+ const maxTimeout = argv['timeout'];
191
371
  if (changes.length === 0) {
192
372
  changes = path.join(outputPath, 'changes');
193
373
  }
@@ -198,53 +378,30 @@ const args = // eslint-disable-line no-unused-vars
198
378
  const errorLines = [];
199
379
  const fileLines = [];
200
380
  const failedLines = [];
201
- const excludeRegex = excludeFilter.length > 0 ? new RegExp(excludeFilter) : void 0;
202
- const isExcluded = excludeRegex !== void 0 ?
203
- ((testPath) => excludeRegex?.test(testPath)) :
204
- (testPath) => false;
205
- const recursiveWalk = async (parentPath) => {
206
- const items = await fsPromises.readdir(parentPath, { withFileTypes: true });
207
- items.sort((a, b) => a.name > b.name ? 1 : -1);
208
- for (const item of items) {
209
- const relativePath = path.join(parentPath, item.name);
210
- if (isExcluded(relativePath)) {
211
- continue;
212
- }
213
- const resolved = path.resolve(parentPath, item.name);
214
- if (item.isDirectory()) {
215
- await recursiveWalk(resolved);
216
- }
217
- else if (path.extname(resolved) === '.ifc') {
218
- const fileResults = await runForFile(resolved, path.join(outputPath, path.basename(resolved, '.ifc')));
219
- if (fileResults.type === 'Run') {
220
- if (fileResults.errorLines !== void 0) {
221
- errorLines.push(...fileResults.errorLines);
222
- }
223
- // eslint-disable-next-line max-len
224
- fileLines.push(`${csvSafeString(path.basename(resolved))},${csvSafeString(fileResults.hash ?? '')},${errorLines.length}\n`);
225
- }
226
- else {
227
- // eslint-disable-next-line max-len
228
- failedLines.push(`${csvSafeString(path.basename(resolved))},${csvSafeString(fileResults.code?.toString() ?? '')},${csvSafeString(fileResults.signal ?? '')}\n`);
229
- }
230
- }
231
- }
232
- };
233
- await recursiveWalk(ifcFolder);
234
- const manifestFile = await fsPromises.open(mainPath, 'w');
235
- await manifestFile.writeFile('file,hash,errors\n');
236
- await manifestFile.writeFile(fileLines);
237
- await manifestFile.close();
238
- const errorFile = await fsPromises.open(errorPath, 'w');
239
- await errorFile.writeFile(`${errorCSVHeader}\n`);
240
- await errorFile.writeFile(errorLines);
241
- await errorFile.close();
242
- const failedFile = await fsPromises.open(failedPath, 'w');
243
- await failedFile.writeFile('file,code,signal\n');
244
- await failedFile.writeFile(failedLines);
245
- await failedFile.close();
246
- await runDiff(outputPath, target, changes, dryRun);
247
- // TODO(@nickcastel50) - figure out why this hangs at the end sometimes
248
- process.exit(0);
381
+ const excludeRegex = excludeFilter.length > 0 ? new RegExp(excludeFilter) : undefined;
382
+ if (doParallel) {
383
+ console.log('Processing in parallel mode...');
384
+ // 1) Collect all IFC files first
385
+ const allIFCFiles = await collectIFCFiles(ifcFolder, excludeRegex);
386
+ // 2) Process them in parallel
387
+ await processIFCFilesInParallel(allIFCFiles, outputPath, errorLines, fileLines, failedLines, memUtilization, maxTimeout);
388
+ }
389
+ else {
390
+ console.log('Processing in serial mode...');
391
+ // eslint-disable-next-line max-len
392
+ await recursiveWalk(ifcFolder, excludeRegex, outputPath, errorLines, fileLines, failedLines, maxTimeout);
393
+ }
394
+ // Write out results
395
+ await fsPromises.writeFile(mainPath, `file,hash,errors\n${fileLines.join('')}`);
396
+ await fsPromises.writeFile(errorPath, `${errorCSVHeader}\n${errorLines.join('')}`);
397
+ await fsPromises.writeFile(failedPath, `file,code,signal\n${failedLines.join('')}`);
398
+ // If user wants a git diff
399
+ await runDiff(ifcFolder, outputPath, target, changes, dryRun);
400
+ // ---- New: log total runtime
401
+ const divisor = 1000;
402
+ const fixedPoint = 2;
403
+ const overallEnd = Date.now();
404
+ const totalSec = ((overallEnd - overallStart) / divisor).toFixed(fixedPoint);
405
+ console.log(`\nAll tasks completed. Total runtime: ${totalSec} seconds.`);
249
406
  })
250
407
  .help().argv;