Hello,

I'm working on a project with thousands of nodes that use geofield for location data. I'm using Leaflet to display the nodes on a map. The map might have to load up to a couple of thousand markers depending on position and filters. This becomes a huge resource hog, as the default views implementation of Field API fields forces the view to load all corresponding nodes, when all i need is the location data.

I propose another field handler, that manually joins the view with the geofield tables without loading the entities.

A downside to this is that entity related hooks wont fire (field_access?), so access might have to be configured manually (or emulated in the handler?).

I have a proof-of-concept sandbox set up here. Feel free to use that code as a starting point if this is something you'd consider adding to geofield.

Comments

skylord’s picture

If anyone's interested in it: that approach implemented in https://www.drupal.org/project/geofield_ymap module - it creates additional view field handler which does not load all associated entities.