This page takes around 30 seconds to load with only one map using OpenStreetMap API: hidden link
It's built with old views plugin, but I've tried also with blocks with same result.
It is normal? I don't understand why it takes so long to load, considering that the API queries are cached.
In order to minimize the cause of the issue and to enusre there is no conflict with the theme or plugins you use:
Could you please try to resolve your issue by deactivating all third-party plugins as well as the default theme to check for any possible conflicts with any of the plugins or themes?
- Do you see any differemce?
To avoid affecting the production site, we created a duplicate of the website in a test environment.
After deactivating all plugins except the Toolset plugins and changing the theme to Twenty Twenty Five, the load time was reduced to about 20 seconds. I still think that's too long.
In general, performance of your site depends on what size of images you load and how you are loading those. Also, it depends also on your server configuration (memory, cashing, server processing capacity, internet speed) as well as number of other factors such as how complex your data structure is like how much content you have with your post types, taxonomies and custom fields and post-relationship.
No caching plugin is being used on the website. It's not a server issue either; it works with good performance.
If you visit any other page on the website, the loading times are normal. For example, the page that displays paginated offers takes just 7 seconds to load: hidden link
The problem arises when we try to display the geolocated offers on the map.
I've tried leaving only 3 active offers, and the loading time (without active plugins or themes) is 1.2 seconds.
With 10 active offers, the loading time increases to 3 seconds.
With 20 entries, the loading time is 5 seconds.
With 67 entries, the loading time is 20 seconds.
I think it's obvious that the number of entries displayed on the map is directly related to the page loading time.
Just to ensure that the issue is from Maps, what if you try to switch to the Google Map API and check if you able to see the same issue even with Google Map API. That will ensure that the issue is with OpenStreetMap.
I switched to the Google Maps API, and the load time has been reduced to 4 seconds.
The problem we were having with the Google Maps API is that, for some unknown reason, we started receiving €200 invoices from Google for API usage when the website barely had 100 visits per day, so we stopped using it.
You recently announced that you had integrated the OpenStreet API, so we started using it, but the load times are still too high.
Can you please send me admin access details and let me check what's going wrong with your setup.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I have set the next reply to private which means only you and I have access to it.
By default map markers rendering is slower in OpenStreet Maps - that is why they are free.
There is no quick fix but we will try to improve on it but for that I will require duplciator copy of your site that will pass to our Devs and they will look further on it and check what are the possible ways to improve the performance in this case.