This project is not covered by Drupal’s security advisory policy.

This module optimizes loading of multiple filefield data in Views. For every filefield/imagefield value displayed in a view, it will remove 1 redundant query generated by the FileField module to load file data.
It's probably mostly useful for image galleries and file directories, because they often display many files.

Usage

To make this module work, you need to modify your view.
First, you need to add relationship to the files table, unless the view already contains it. For imagefields the relationship is usually named in the form "Content: [field label] ([field_name]) - fid".
Then, you need to add special field of this module: FFLM Preloader.
Save the view, and enjoy decreased number of queries the view generates.

F.A.Q.

Q: Why waste time on optimizing these fast queries ?
A: First, every query matters when you have image galleries with hundreds of images. Second, I did it for fun. And third, you don't have to waste time, cause I already did :)

Q: Isn't this kind of optimization better suited for the FileField module itself ?
A: Yes. From my experience, though, it's always better to have fast working solution without patching and waiting for 1 year until the patch is accepted. You are free to take this code and advocate for inclusion in the FileField.

Project information

Releases