0

I am hosting a static web page, which you can visit at nswcorona.imfast.io. It is a very large index.html file with many elements (displaying geo-data), and takes about 10-15 seconds to load. I am new to web development, so I'm sure it's not optimised. I was hoping somebody could kindly help with some tips on speeding it up. You can view the source code by right-clicking on the page -> View page source. Thanks!

1 Answer 1

1

You should avoid using a single static page that loads all the data at once.

  • You only need the dots that are on the currently visible area, and you could get more e.g. from a separated JSON API that gives the places that are within a given area. This would probably make the map responsive sooner, too.
  • When someone zooms out, the individual dots aren't that useful anymore. You could merge some of the nearby dots to a single bigger one, showing the count instead.
  • Fix all the errors & warnings from the console. It's flooding e.g.
    • The input spec uses vega-lite v4.8.1, but the current version of Vega-Lite is 2.7.0.
    • The compiled spec uses Vega v4, but current version is 3.3.1.

Not the answer you're looking for? Browse other questions tagged or ask your own question.