I'm in the process of moving from GMap to OpenLayers and I faced some nasty performance surprise while testing:
I created an openlayers view, a very simple view, which has only node title and node wkt data (supplied by geofield) fields enabled. To my surprise, when I checked Views with devel I saw that OpenLayers view loads a whole node for each marker producing loads of queries to get all the stuff which comes with a standard entity_load(). Why is that? Am I doing something wrong (can't see what) or OL View is constructed to load whole entity per marker? If yes, then I just can't get, why do I want to load the whole node to show a marker on a map?

CommentFileSizeAuthor
#2 views_export.txt19.59 KBtimonweb
#2 97590.txt845.03 KBtimonweb

Comments

nod_’s picture

I don't think it should do that. Can you paste an export of your view please ? Also have you tried dev ? there was a patch dealing with node rendering last week if i remember well.

timonweb’s picture

StatusFileSize
new845.03 KB
new19.59 KB

Hi nod_!
I've tried dev, no changes, my view export is attached as .txt

I analyzed devel query log (97590.txt) and I see that View calls:

page_title_load_title - 32 times
comment_node_load - loads data for 32 entities
user_node_load - loads data for 32 entities

32 is the number of points on the map. So this tells, that View loads full entities to show a point on a map. If I detached OpenLayers View all these queries disappear.

nod_’s picture

You sure it's not views that load the node every time even for fields ? Because I think the only node_load in openlayers was introduced in the previous patch i was talking about.

timonweb’s picture

Status: Active » Closed (won't fix)

Indeed! I missed the fact that in D7 Views loads entities to render fields. Damn.... This may be closed.