Closed (fixed)
Project:
File Entity (fieldable files)
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
24 Aug 2011 at 08:10 UTC
Updated:
3 Jan 2012 at 22:30 UTC
Jump to comment: Most recent file
Comments
Comment #1
berdirComment #2
berdirMoving over to File entity, as requested by Dave Reid. Patch will need to be updated, though.
Comment #3
berdirComment #4
dave reidSeems like a good change.
Comment #5
berdirSame code as before.
Comment #7
dave reidFile entity has switched to a 7.x-2.x branch and the 7.x-1.x branch is no longer used. Please make sure to update your Git clones.
Comment #8
berdirRe-rolled the patch against 7.x-2.x
Comment #9
mfer commentedThis still applies with a small offset.
Comment #10
dave reidThis static cache doesn't really do a whole lot of good performance-wise with fallback condition.
If I run the following calls:
The patch in #8 results in:
3 cache misses
3 calls to field_view_mode_settings()
3 calls to file_displays_load()
This patch results in:
2 cache misses
2 calls to file_displays_load()
2 calls to field_view_mode_settings()
Comment #11
dave reidActually this is easy to reproduce the bug in #8 by just calling file_displays('video', 'non-existant-view-mode'); multiple times over and over. Each time will result in a cache miss and call to file_displays_load(). Tested and committed #10 to Git.
http://drupalcode.org/project/file_entity.git/commit/20eb1bf (file_entity 7.x-2.x)
http://drupalcode.org/project/media.git/commit/cf71b86 (media 7.x-1.x)