hooks "print_node_load" and "print_mail_node_load" generating too many sql queries.

i.e. i have a "custom page" with 20+ nodes, witch displaing as node_teaser or themed(node->feields),
some of them load another nodes by hierarchy.

hooks "print_node_load" and "print_mail_node_load" generating 615 sql queries and they have taken about 400ms page loading time. it's only "front page", on catalog page i load 300+ node teasers.

We must to add any condition to check "realy we need to execute a query for this node", or change "print_node_load & print_mail_node_load" to "print_node_view & print_mail_node_view" and check by node->view_type.

Comments

simon georges’s picture

Category: feature » bug
Priority: Major » Normal

Could eventually be considered as a bug, if it's a real hit on performance.

thinkdrupal’s picture

Issue summary: View changes

It is a performance issue. Any unnecessary calls to the dbase is a performance issue. It will only get worse over time.

For me as a temp workaround for my home page, i'm adding logic to check if front page before allowing the sql request. Nothing on my front page will be printable. Unfortunately, I will have to hack this module.