Skip Navigation

[Resolved] For many records very long response times / Google Maps API Limit reached

This support ticket is created 6 years, 6 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 4 replies, has 3 voices.

Last updated by markusK-6 6 years, 5 months ago.

Assisted by: Shane.

Author
Posts
#918686

Hello,

after import of 24000 posts with adresses the response times are very long or will not finish.
What can i do?

Moreover the Google API is very fast on the limit.
How can I optimize the whole, or reduce the requests to google?

Please ty with: hidden link
or
hidden link

Nice regards
Markus

#918909

after import of 24000 posts with adresses the response times are very long or will not finish. What can i do?
Distance-based searches are processor-intensive. You can add a caching plugin to help improve the response time of these queries a bit, and you can lower the number of results shown on one page to help response times as well. You can also install Query Monitor and inspect each individual database query. If any single query takes longer than 0.5ms, we can investigate in more detail.

How can I optimize the whole, or reduce the requests to google?
Each map address must be geocoded individually, so I do not know of any way to get around the geocoding API quotas by batch-processing. Toolset Maps uses a caching system to store the geocoded addresses after processed once by the Geocoding API. After the addresses have been geocoded at least once, the cache will be utilized in future requests. So at first you will have many requests, but in the future you will have fewer and fewer requests as the cache builds up. Only new addresses will require requests to the API.

In a View that shows many results with maps, I would consider switching to static maps. These are simple map images instead of full interactive maps. On the single results page, show the full interactive map. The Static Maps API is a separate API that must be activated in the Google API Console, and has its own quotas and restrictions:
https://developers.google.com/maps/documentation/maps-static/usage-and-billing

Check out this ticket for an example of using static maps instead of interactive maps:
https://toolset.com/forums/topic/very-slow-loading-of-maps/

#919811

Hi Christian,

which cache plugin would you recommend in combination with toolset views?

Nice regards
Markus

#920404

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Markus,

As Christian is currently on vacation. I will be looking after his queue.

Actually you can use the WP-Total Cache plugin.

Thanks,
Shane

#920667

ok thank you!