Views Module load all unwanted field value with field_sql_storage_field_storage_load

时光总嘲笑我的痴心妄想 提交于 2019-12-11 04:55:04

问题


I am anoid by Views module, it load all field value by field_sql_storage_field_storage_load for each one but not only selected into field displaying. check below :

Content type definition Views definition

I'm using Devel module to display queries onload and it display field_shouldnotloaded queried but i don't need it ! So, Views load all field , if you have 100 fields and want to display only one , you'll have 100 queries performed for 1 value to display => 99 useless..

This is a bad thing for drupal performance and slow displaying (i have varnish and memcache). This issue appears from recently update version of views.

$ drush status
 Drupal version                  :  7.43-dev
 [...]

$drush pm-list | grep views
 Chaos tool suite  
 Views content panes (views_content) Module  Not installed  7.x-1.9
 Views    Views (views) Module  Enabled        7.x-3.13
 Views    Views UI (views_ui)

If anyone have an idea to up performance or fix this issue ? Thanks you :)

EDIT

The issue spotted ! Views use entity_load into views/modules/field/views_handler_field_field.inc => function post_execute

This part must be rewrite to limit data loaded instead of all of fields !

来源:https://stackoverflow.com/questions/42650232/views-module-load-all-unwanted-field-value-with-field-sql-storage-field-storage

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!