From 73d5c3f6a72eacfb19680599dd8dc482c7621d13 Mon Sep 17 00:00:00 2001 From: Richard Zink Date: Sat, 10 Oct 2026 13:37:35 +0200 Subject: [PATCH] settlements: drop costly relation tier from place query (timed whole cells out), 3 mirror rounds with jitter, per-cell progress log; verified live: 1747 places -> 3855 lights --- vendor/clouds3d.js | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/vendor/clouds3d.js b/vendor/clouds3d.js index e5641f4..dab5904 100644 --- a/vendor/clouds3d.js +++ b/vendor/clouds3d.js @@ -1905,12 +1905,12 @@ function opQuery(q, startIdx, attempt) { } // full retry ladder over all mirrors, 2.5 s pause between failed attempts function opTry(q, startIdx) { - var MAX = CAR_ENDPOINTS.length * 2; + var MAX = CAR_ENDPOINTS.length * 3; // three full mirror rounds function go(a) { if (a >= MAX) return Promise.resolve(null); return opQuery(q, startIdx, a).then(function (txt) { if (txt) return txt; - return new Promise(function (r) { setTimeout(r, 2500); }) + return new Promise(function (r) { setTimeout(r, 2500 + Math.random() * 2000); }) .then(function () { return go(a + 1); }); }); } @@ -2154,11 +2154,11 @@ function fetchSettlements() { cells.push({ id: 'geo/place_' + la.toFixed(2) + '_' + lo.toFixed(2), start: ci % CAR_ENDPOINTS.length, // spread mirror load - // all three geometry types: many places (esp. German city - // districts) exist only as way/relation, not as a node - q: '[out:json][timeout:40];(node' + rx + '(' + bb + ');' + - 'way' + rx + '(' + bb + ');' + - 'relation' + rx + '(' + bb + '););out center tags;' + // node + way: way carries districts mapped as areas; the + // relation tier costs the server ~3x the time for <1% extra + // places and regularly timed whole cells out + q: '[out:json][timeout:35];(node' + rx + '(' + bb + ');' + + 'way' + rx + '(' + bb + '););out center tags;' }); ci++; } @@ -2221,7 +2221,11 @@ function fetchSettlements() { }); }).then(function (txt) { if (txt) { + var before = list.length; parse(txt); + if (list.length > before) + console.log('[clouds3d] place cell ' + entry.id + ': +' + + (list.length - before) + ' places (total ' + list.length + ')'); if (!entry._cached) fresh++; if (!entry._cached || !cityGeo) scheduleRebuild(); }