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.

CommentFileSizeAuthor
#5 apps_page_load_is_slow-2367191-5.patch1.39 KBmpotter
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

hefox’s picture

I 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).

  • hefox committed 805bdf0 on 7.x-1.x
    Issue #2367191: make local exists check use local operations for minor...
hefox’s picture

Added 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?

  • hefox committed 0c51d73 on 7.x-1.x
    Issue #2367191: remove the completily misplaced explanation mark
    
mpotter’s picture

Here 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.

mpotter’s picture

Status: Active » Needs review