maiuswong / simaware-express

SimAware on Express.js
GNU General Public License v3.0
25 stars 39 forks source link

Remove synced API requests #105

Closed kenkam closed 8 months ago

kenkam commented 8 months ago

The PR reloads the page 15 seconds after page loads, intead of triggering reloads at 1, 16, 31, and 46th seconds of the minute. This reduces synchronised API calls to the VATSIM API servers across clients, assuming they have synchronised clocks, and also makes it slightly more efficient by avoiding a reload if you were to visit the page just before the previous hardcoded reload triggers.

Also, I forgot to build the minified js with my previous PR #104. I'm assuming we have to manually update this file and there isn't some sort of CI set up that builds it on merge / deploy, so I've updated it with this PR.

I think your commit to move the initialisation of layers_positions before the fetch has fixed this for prod as my PR hasn't actually made it into the minified file 😅 .