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/