From 066fbd4913630195108a4e8159e356782b82cbed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20=C5=BDivkovi=C4=87?= Date: Fri, 14 Oct 2022 19:32:13 -0700 Subject: [PATCH] Change connected to be dictionary instead of array. No functional changes but should be slightly better performant. --- modules/routes-generator.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/routes-generator.js b/modules/routes-generator.js index e4ec3374..1904b35b 100644 --- a/modules/routes-generator.js +++ b/modules/routes-generator.js @@ -68,7 +68,7 @@ window.Routes = (function () { const bodies = new Set(allPorts.map(b => b.port)); // water features with ports let paths = []; // array to store path segments - const connected = []; // store cell id of connected burgs + const connected = {}; // store cell id of connected burgs bodies.forEach(f => { const ports = allPorts.filter(b => b.port === f); // all ports on the same feature