I'm having problems getting my map to load data consistently quickly and smoothly. The buttons on my map execute sql queries to display data per category and by year. When I click between them, especially the radio buttons and year options, the data is sometimes displayed quickly, but most of the time (for me at least) there will be a pause for 2-3 seconds before the map refreshes, or an 8+ second pause at its worst.

Because I want to eventually publish my map for public use, I really want to fix this issue first - how can I speed up or optimise my map's performance to prevent these long waits between reloads?

Link to the map: https://jsfiddle.net/Sidders/w9rzhLbr/

  • Have you applied postgreSQL indexes on the columns of the tables used in the WHERE clause in the SQL queries that you apply? Have you simplified the polygon data using the PostGIS ST_simplify() function ? – oriolbx Feb 26 '17 at 13:30
  • check if your tables have the proper indexes depending on the queries you do.
  • reduce the complexity of your geometries to the zoom level you want to "offer" your map
  • reduce the number of interactivity fields to those you really need so the UTF-Grids are as small as possible
  • reduce the CartoCSS rules to the minimum, maybe you want to use TurboCARTO.

On the other hand at the end, you are using a free service where performance depends not only on your application but also on other users account activity. Service Level Agreements are available for enterprise users where resources are dedicated.

  • Thank you for your suggestion @jorge-sanz. I'm giving TurboCARTO CSS code a go but I've started experiencing display problems which may or may not be related. I posted a separate question about this here – Sidders Mar 24 '17 at 21:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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