Passer la navigation

[Assigné] OSM map loading slow with +600 markers

This support ticket is created Il y a 2 days, 1 hour. 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Fuseau horaire du supporter : Asia/Kolkata (GMT+05:30)

Ce sujet contient 15 réponses, a 1 voix.

Dernière mise à jour par herbie4 Il y a 23 hours, 54 minutes.

Assisté par: Minesh.

Auteur
Publications
#2863183

This page is loading in 1:37 min lien caché
Any suggestions how to speed this up?

#2863198

Minesh
Supporter

Les langues: Anglais (English )

Fuseau horaire: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Displaying more than five hundread marker on map is obviously time consuming process and affect the performance.

I see you already apply the markere clustering.

You can go for pagination rather than adding all markers at once.

Use few cache plugins and check if that may helps.

In addition to that - Could you please send me debug information that will help us to investigate your issue.
=> https://toolset.com/faq/provide-debug-information-faster-support/

#2863200

see debug info

#2863261

Minesh
Supporter

Les langues: Anglais (English )

Fuseau horaire: Asia/Kolkata (GMT+05:30)

Based on the debug information you sharred - I see you are using latest Toolset plugins.

Have you try to use any cache plugin. Do you see any difference?

Please check:
- https://toolset.com/faq/how-to-use-optimization-plugins-with-toolset/

If above does not help - I'll require duplicator copy of your site.
- https://toolset.com/faq/provide-supporters-copy-site/

I have set the next reply to private which means only you and I have access to it.

#2863278

Hello Minesh,
Is there any way I can have the page load already with the map loading defered and showing a loading icon?
I have tested with pagination, then the speed is okay, but in the map not all markers are showing of course. So this is not a prefered solution.
Kind regards, hrbrt

#2863281

Minesh
Supporter

Les langues: Anglais (English )

Fuseau horaire: Asia/Kolkata (GMT+05:30)

I checked further and what I found is TTFB or waiting for server response takes almost 1.2 minutes.

Can you please try to check this on another server or get in touch with your hosting authority and check with them why it takes too long TTFB or waiting for server response.

#2863284

yes, tested this locally. This is happening there too. Probably because it is getting all the markers (500+) and because of the dynamic filter on the map it is not caching in toolset views. I've checked the error logs and there are no messages.

Q: would it help/work if I enabled Reddis on the server?

#2863289

Minesh
Supporter

Les langues: Anglais (English )

Fuseau horaire: Asia/Kolkata (GMT+05:30)

It seems its due to you hae more than 600+ markers added on map and you also confirm that addingn pagination improves the performance.

You can check for slow queries by adding query monitor plugin and check if you can improve any query. You can also try to add plugin that supports whole page cache or enabled Reddis on the server and see if you able to see any improvement.

#2863291

FYI just tested with Reddis enabled and configured but that does not speed up page loading on the maps page.
Will try query monitor and have a look.

#2863298

In query monitor I can see api calls (50) getting blocked on OSM api... any ideas why and how to solve this?

lien caché
?q
&format=json
&limit=1 429 Too Many Requests

Toolset_Addon_Maps_Common::get_coordinates_osm()

Plugin: toolset-maps 5 1,7502

#2863301

Minesh
Supporter

Les langues: Anglais (English )

Fuseau horaire: Asia/Kolkata (GMT+05:30)

Can you please share admin access details and let me see.

*** 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.

#2863310

Hello Minesh,
Setting up a staging site will take some time.

Would like to know before if this is a limit by nominatim?!
Can I use a wp rest cache to bypass the issue?

Kind regards, hrbrt

#2863313

Follow up question:

maps addon plugin -> get_coordinates_osm()
looking in the code coordinates are requested by address. Why not store the coordinates in the database?

#2863314

Minesh
Supporter

Les langues: Anglais (English )

Fuseau horaire: Asia/Kolkata (GMT+05:30)

Can you please check this:
- https://toolset.com/course-lesson/data-caching-for-maps-addresses/

And try to follow the instructions given under the heading "Checking for Missing Cache Entries".

Does that helps - do you see any missing address entries?

#2863316

check-> 5 missing cache entries found. 5 cache entries processed.
That does not explain the too many requests error. As found in the documentation the map will not use cached entries if a filter is present. Am I correct?