Closed (fixed)
Project:
ImageCache Defaults
Version:
7.x-1.x-dev
Component:
Performance
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
15 Aug 2012 at 14:37 UTC
Updated:
9 Sep 2012 at 15:01 UTC
Not a huge deal, my (simple) profiling shows it takes a fraction of a millisecond for ICD to do its thing for each path but we can avoid hitting the file system to determine the operation (replace/remove/ignore) if we've already processed said path somewhere else on the page simply by statically storing the operation in an array keyed by path.
Comments
Comment #1
thedavidmeister commentedComment #2
thedavidmeister commentedJust changing this to a performance related task.
Comment #3
thedavidmeister commentedAdded this to 6.x-1.x with tests.
Comment #4
thedavidmeister commentedPorted to 7.x-1.x with tests. Uses drupal_static() in D7 implementation to be compatible with drupal_static_reset().
Comment #5
thedavidmeister commentedAh, actually, moving the implementations for this into imagecache_defaults_valid_image and imagecache_defaults_valid_image_uri should give better performance overall as those functions are called elsewhere in the in the module code.
Setting this to "needs work".
Comment #6
thedavidmeister commentedpushed latest updates to dev branches in repo.