Working on #1040790: _field_info_collate_fields() memory usage, which aims at lowering the memory footprint of the field_info_*() functions in D8 and D7.
I grepped through the usage of the (memory intensive) field_info_instances() function in a couple big contrib modules.
Attached is a version of field_permissions_overview() that relies on field_info_fields() rather than field_info_instances()
Right now every field_info_*() functions reads from a huge static array, so field_info_fields() and field_info_instances() have the same memory cost. If the patch in #1040790: _field_info_collate_fields() memory usage gets in (and backported), field_info_fields() will be much more memory-friendly than field_info_instances() - although the latter won't become worse than in current D7.
The code should be strictly equivalent, but I didn't test my changes for typos / var renames...
| Comment | File | Size | Author |
|---|---|---|---|
| field_perms-memory_usage.patch | 2.06 KB | yched |
Comments
Comment #2
mariacha1 commentedThanks for this! Patched with a few small changes applied and committed.