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...

CommentFileSizeAuthor
field_perms-memory_usage.patch2.06 KByched

Comments

  • mariacha1 committed e9c2758 on 7.x-1.x authored by yched
    Issue #1447444 by yched: Memory friendlier version of...
mariacha1’s picture

Issue summary: View changes
Status: Needs review » Fixed

Thanks for this! Patched with a few small changes applied and committed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.