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.
Loading the Apps page is currently very slow when you have a lot of apps.
This might be related to how it is fetching all of the icon images for the apps. For local apps it should be letting the image_styles do the image loading and caching. For remote apps, the icons should also be cached via image styles.
Comment | File | Size | Author |
---|---|---|---|
#5 | apps_page_load_is_slow-2367191-5.patch | 1.39 KB | mpotter |
Comments
Comment #1
hefox CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: mpotter commented