Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Just did a cachegrind and getimagesize() took 1,093ms for 8 calls. I'm using memcache so if we were to store this info in a cache_imagecache bin I'm guessing that would be quicker. image_get_info() is where this PHP function is called, so I'm proposing having cache_get/set be in theme_imagecache().
Thoughts? Create my own module and overwrite this theme function? Preprocess function?
files dir is a S3 mount thus its a little bit slower.
Comment | File | Size | Author |
---|---|---|---|
#4 | imageinfo_cache.tar_.gz | 875 bytes | mikeytown2 |
#3 | imageinfo_cache.tar_.gz | 872 bytes | mikeytown2 |
Comments
Comment #1
mikeytown2 CreditAttribution: mikeytown2 commentedhook_theme_registry_alter seems to be the answer I was looking for.
This something you want or should I put it in a new module called imageinfo_cache?
Comment #2
mikeytown2 CreditAttribution: mikeytown2 commentedif files are local image_get_info is faster, so this should live outside this module.
Comment #3
mikeytown2 CreditAttribution: mikeytown2 commentedmodule if anyone else has this issue
Comment #4
mikeytown2 CreditAttribution: mikeytown2 commentedfixed a big error with the last module.
Comment #5
mcdruidSee: https://www.drupal.org/project/imageinfo_cache