From 9f01920eaaf3cd8884169d8a3cbf7cb023714643 Mon Sep 17 00:00:00 2001 From: Matthias Wirth Date: Wed, 22 May 2024 23:28:52 +0200 Subject: [PATCH] minimal load ordering maybe a tiny bit quicker --- html/script.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/html/script.js b/html/script.js index 9db32ff..224c4b6 100644 --- a/html/script.js +++ b/html/script.js @@ -490,6 +490,9 @@ function afterFirstFetch() { g.firstFetchDone = true; + updateVisible(); + mapRefresh(); + setTimeout(() => { console.time('afterFirstFetch()'); @@ -2011,10 +2014,7 @@ function setIntervalTimers() { timersActive = true; - setTimeout(fetchData, 5); - - updateVisible(); - mapRefresh(); + fetchData(); // in case the visibility changed while this was running handleVisibilityChange();