问题
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