The document discusses mapping large numbers of points in Drupal views and some solutions to improve performance when displaying many map points, including using the Leaflet and OpenLayers libraries, enabling client-side clustering with modules like Leaflet Marker Cluster, and progressively enhancing server-side functionality with client-side clustering using the Geocluster module. It provides examples of function call counts and speeds with different mapping approaches and libraries for datasets with thousands of records.
6. Your map page is slow?
There's actually a drupal-tific explaination for
that:
http://drupal.org/node/1828584
It's a troublesome space trying to deal with presenting large amounts of map points on a map. Typically in drupal space because
of other implementations of drupal views mapping integration we experience an exponential theme function calls that directly
dependent on the number of records and fields on a view. Thus we encounter "slow" pages in drupal views map pages.
Hey with a dataset of 2500+ records and 3 fields having an average number of function calls of over a million plus. Yup it's going
slow.
For example 2500+ records, 3 fields.
Openlayers http://drupal.org/project/openlayers : average of 4.1 million function calls
Leaflet http://drupal.org/project/leaflet : average of 1.3 million function calls
Leaflet with clientside geoclustering http://drupal.org/project/leaflet_markercluster : average of 1.3 million function calls
IMPRESSED?! Now lets move on to bill
charges..
7. What those numbers don't
mean much to you?
Current MAP Profile (Openlayers)
Executed 90 queries in 240.71 ms. Queries exceeding 5 ms are highlighted.
Overall Summary
Total Incl. Wall Time (microsec): 104,400,257 microsecs
Total Incl. CPU (microsecs): 104,150,000 microsecs
Total Incl. MemUse (bytes): 183,759,392 bytes
Total Incl. PeakMemUse (bytes): 261,900,368 bytes
Number of Function Calls: 5,615,141
(Leaflet) Before Client Side Clustering
Executed 7831 queries in 1920.3 ms. Queries exceeding 5 ms are highlighted.
Total Incl. Wall Time (microsec): 27,077,213 microsecs
Total Incl. CPU (microsecs): 26,560,000 microsecs
Total Incl. MemUse (bytes): 242,216,840 bytes
Total Incl. PeakMemUse (bytes): 242,562,616 bytes
Number of Function Calls: 1,303,140
See Screenshot: Screenshot-leaflet-before-geoclustering-clientside.png
8. I heard from the interwebs
that you must cluster.
http://drupal.org/project/leaflet_markercluster
9. WHAT?! your map page is
slow?
There's actually drupal-tific explaination for that.
(Leaflet) After Client Side Clustering
Executed 7826 queries in 1913.9 ms. Queries exceeding 5 ms are highlighted.
Overall Summary
Total Incl. Wall Time (microsec): 27,534,700 microsecs
Total Incl. CPU (microsecs): 27,030,000 microsecs
Total Incl. MemUse (bytes): 236,385,248 bytes
Total Incl. PeakMemUse (bytes): 236,872,064 bytes
Number of Function Calls: 1,302,893
See Screenshot: Screenshot-leaflet-after-clientside-clustering.png
IMPRESSED?! Now lets move on to bill
charges..
10. OK! I tawked to an
consultant
She sez best thing evar is http://drupal.
org/project/geocluster
11. What she clicked how
many times?
The system admin is reporting too many ajax
calls..
13. Ok.. its close but we need
more time ;)
Progressively enhance server-side with client-side
clustering
http://drupal.org/node/1914704
See you at the issue queues.
http://www.drupal.org/project/geocluster