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

thedavidmeister’s picture

Category: bug » feature
thedavidmeister’s picture

Component: Code » Performance
Category: feature » task

Just changing this to a performance related task.

thedavidmeister’s picture

Added this to 6.x-1.x with tests.

thedavidmeister’s picture

Status: Active » Fixed

Ported to 7.x-1.x with tests. Uses drupal_static() in D7 implementation to be compatible with drupal_static_reset().

thedavidmeister’s picture

Status: Fixed » Needs work

Ah, 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".

thedavidmeister’s picture

Status: Needs work » Fixed

pushed latest updates to dev branches in repo.

Status: Fixed » Closed (fixed)

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