GNOME Bugzilla – Bug 778619
Download image data at runtime
Last modified: 2017-04-04 02:07:41 UTC
We currently have 18 recipes by 13 chefs included in our data, and our 0.12.0 tarball weighs 73M. Clearly, we can't keep going like this and we need to think about some solution for hosting at least the image data somewhere else.
With 26 recipes, we have 100M of images. A rough outline for a plan, based on what gnome-software does for screenshots: 1) Include the default image for each recipe and the chef images with the app, so we can populate the tiles without delay. 2) When opening the detail page for a recipe, start downloading any missing images. 3) We may or may not need to do the same trick gnome-software does, where it first downloads a thumbnail and then proceeds to load the full-size image. 4) Use ${sha256}-${original-name} to locate the images. 5) Store downloaded images in XDG_CACHE_DIR
Once we start getting new recipes and chefs by downloading data, the 'preinstall some images' part does not make too much sense anymore; we better just make sure to download the default image for each new recipe quickly and make tiles deal with images that are still being downloaded.
There's an image-download branch that has an implementation.
*** Bug 780224 has been marked as a duplicate of this bug. ***
Image content will be hosted at static.gnome.org/recipes. Some example content is there already. To do before this is ready for prime time: - Verify that setting local images during recipe import and in other places works cleanly - Store some negative cache entries so we don't try a failing url more than, say, once per day - Consider a low-bandwidth setting that would try to load lower-resolution versions of the images, which will have to be provided on the site - Handle change of image content, somehow (look what gnome-software does)
- Store version information in the recipe and chef databases: [Metadata] Version=1
- Make sure we load only images that are actually visible
- make sure libsoup builds and works on OS X