Needs review
Project:
Apps
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
31 Oct 2014 at 17:25 UTC
Updated:
14 Oct 2015 at 18:49 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
hefox commentedI think the issue is that
1) even for local apps, it's doing an http request to get the image >.O
2) It keeps getting the image even if hasn't changed on cache clear
So, making it more performant for local apps when they have new images and not refetching old images is likely what's needed.
The images need to exist in the files folder for image cache to work (this was changed in d7, used to work from any directory in d6).
Comment #3
hefox commentedAdded it so it uses filesize and file last modified to check if local image is needed instead of http request (it using a HEAD http request to check if remote images need to be modified, so better then I thought -- it's not requesting and moving the image every cache clear already :) ) , but the real problem with oa is that 4 screenshots didn't exist but defined in .info file, so got checked every time. Added a file_exists check for local images so doesn't bother processing in that case.
Since screenshots are only used on detail page, could refactor it so only requests those for that page. Thoughts?
Comment #5
mpotter commentedHere is a patch to further improve this. For local files it grabs the direct image file contents instead of using http requests. This also helps avoid http caching if you want to update app icons by deleting the /files/apps cache.
Comment #6
mpotter commented