I have more then 8000 markers on a Gmap view, using clusters (markerclusterer.js) , and I have a loading time 16 seconds.

How can this be optimized? The view is cached, Drupal is cached and compressed and running on Pantheon already.

This loading time is caused from the view query to get the markers, as they are all already in the head of the HTML page when the page is loaded.

I was thinking to hardcore the markers into JSON, but still I don't know how it could be intehrated with gmap after.

  • Random guess - the markers are nodes? I’d probably start by making the View return a JSON object of markers and caching that - then have the Gmap JS code do a fetch against that. You aren’t loading 8000 entities are you? – Kevin Jul 14 '18 at 15:09
  • yes, they are nodes is there a module to integrate the Gmap JS code with the json? no ,i don`t load the 8000entities – TibiT Jul 14 '18 at 15:27

You could try using Redis, "The World's Fastest Database".

Redis is a very fast non-relational database that stores a mapping of keys to five different types of values. Redis supports in-memory persistent storage on disk, replication to scale read performance, and client-side sharding1 to scale write performance.

Quote from redislabs.com - 1.1 What is Redis?

There is some offical documentaiton on Pantheon on this, Installing Redis on Drupal.

They also made a video about it, Pantheon Academy - Redis on Pantheon

| improve this answer | |
  • Redis is already activated – TibiT Jul 17 '18 at 13:59

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.