← Back to team overview

ubuntu-appstore-developers team mailing list archive

Re: Minimizing icon and screenshot transfer size

 

On Mon, Apr 21, 2014 at 8:09 PM, Alejandro J. Cura
<alejandro.cura@xxxxxxxxxxxxx> wrote:
> When using the Apps scope, there's a noticeable delay when loading
> icons of search results and screenshots of previews.
>
> This happens because the images being served by the webservice are the
> same files uploaded by the developers: for instance, icons are
> 256x256px PNGs, and up to 150kb each. [1]
>
> Such big files are nice to have in the store, if we at some point need
> to show them on a big size on high-dpi laptop screens, but are now
> overkill to show as icons on small devices.
>
> So, there seems to be room for improvement if the scope would pass the
> desired size in pixels of Icons and Screenshots when making webcalls,
> and if the server would take that as a hint to return urls to resized
> images.
>
> I think this is to be one of the biggest speed improvements we can
> make to the Apps Scope, so I'd like to hear all your thoughts on this.

I understand the problem.
The reason we don't already do this, is because programatically
resizing images without making beautifully crafted images ugly is hard
and rarely works. In fact, I've had to fight off the increase of the
default size from 256 to 512   :)
We already allow users to upload smaller sizes, you could be getting
those instead when available. In order to increase the chances they'll
be available, we could add a "generate all sizes" button in the UI for
developers and let them decide if they're happy with the automatic
result.
That way we don't force developers to provide every single possible
size, but still increase the chance there will be smaller sizes.

If we feel this is a big problem, I'd probably suggest we make smaller
sizes mandatory (and with file size limits) so they're available when
and how we need them.

I would also suggest following a bit of what's done in websites, where
you do lazy loading of images[1], prioritise what's visible on the
screen and start loading the next ones once that completes, in
batches. The infrastructure may not be available in scopes, but I
would certainly suggest it gets added to a ToDo somewhere  :)



[1] http://www.appelsiini.net/projects/lazyload/enabled.html

-- 
Martin


Follow ups

References