perf: cache bundled turn lane manifest

This commit is contained in:
que01 committed 2026-09-14 13:48:27 +08:00
1 parent 78c357e445
commit 82846cdebc
3 files changed
+25 -1

No files matched your search

+5
View File
@@ -8,6 +8,11 @@ const compiler = require('../src');
assert.equal(typeof compiler.laneGeometry.laneCenterline, 'function');
assert.equal(typeof compiler.gaodeReference.convertGeoJson, 'function');
assert.equal(typeof compiler.turnLaneArrows.buildCustomTurnLaneArrows, 'function');
assert.strictEqual(
compiler.turnLaneArrows.loadManifest(),
compiler.turnLaneArrows.loadManifest(),
'the bundled turn-lane manifest is reused between compiles',
);
assert.equal(typeof compiler.complexJunction.buildComplexJunctionGeometry, 'function');
assert.equal(typeof compiler.complexJunction.classifyJunctionShape, 'function');
assert.equal(typeof compiler.junctionStructure.buildJunctionStructure, 'function');