New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 591297 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug


Show other hotlists

Hotlists containing this issue:
PhotoEditor-2018q3p2


Sign in to add a comment

Gallery app can't generate thumbnails before Files app

Project Member Reported by ryoh@chromium.org, Mar 2 2016

Issue description

Chrome Version: ToT

Please specify Cr-* of the system to which this bug/feature applies (add
the label below).

Steps To Reproduce:
1. download a big png image, such as images of the Earth:
original: http://goes.gsfc.nasa.gov/pub/goes/080913.ike.poster.jpg
PNG: https://www.dropbox.com/s/atvqa7zddkya7ve/0.png?dl=0
It's more reproducible when you use PNG image(there is no thumbnails in metadata)

2. Open in gallery.
3. Enter thumbnail mode.

Expected Result:
I would like to see thumbnails as soon as possible.

Actual Result:
It looks Gallery can't generate thumbnails before before Files app generated all thumbnails.

How frequently does this problem reproduce? (Always, sometimes, hard to
reproduce?)

Always(?)

Please provide any additional information below. Attach a screen shot or
log if possible.

Files app and Gallery app both use the ImageLoader extension to load/decode.
Are both apps scrambling for the decoding queue?
 
Untitled.png
921 KB View Download

Comment 1 by ryoh@chromium.org, Mar 2 2016

Summary: Gallery can't generate thumbnails before Files app generates (was: Gallery can't generate thumbnails before Files app)

Comment 2 by ryoh@chromium.org, Mar 2 2016

Summary: Gallery app can't generate thumbnails before Files app (was: Gallery can't generate thumbnails before Files app generates)
Components: Platform>Apps>PhotoEditor
Status: Untriaged (was: Unconfirmed)
Cc: sashab@chromium.org
Components: Platform>Apps>FileManager
Status: Available (was: Untriaged)
Cc: slangley@chromium.org nigeltao@chromium.org lucmult@chromium.org yamaguchi@chromium.org
We had plans in the past to remove the ImageLoader extension (using the createImageBitmap web API instead - design doc here https://docs.google.com/document/u/1/d/1IBE-rnIsciRL8W7lNXNadfnkSUtpRDyl1u9jh3xmHco/edit) but it's not on our timeline to be worked on anytime soon.

I'm not sure who's worked on the ImageLoader extension code, but I'm sure someone CCd on this bug will know what the issue is, or at least where to look. I'm guessing both apps should be sharing thumbnail results, so when it loads in one app it loads in both, correct?

Maybe the image_loader extension needs the cache built-into it - I think the file manager app might have it's own cache right now.

Comment 6 by lucmult@google.com, Jun 8 2018

The linked JPG image has 14.7MB (I was wondering how big is a big image). :-)

The linked PNG image returned 404 for me. :-(

The image loader extension does have cache built-in and it also saves the thumbnail on IndexedDB so it should be shared among all our apps/extensions. However there are some limits like max size of cache and/or image that might be interfering here.
Yes, the image_loader extension has built-in cache.
I think the problem is that the requests to generate thumbnails are processed sequentially in FIFO manner. When we open Files app in grid mode, Files app request image_loader to generate all thumbnails of image files in the viewport. Even when we open Gallery app just after we open Files app, the request to generate a thumbnail for Gallery app will be queued until all requests from Files app finish.
Maybe we should introduce priority to generate thumbnail and prioritize a thumbnail for Gallery app's main view than thumbnails in Files app grid view.

Comment 8 by sashab@chromium.org, Jun 12 2018

Cc: weifangsun@chromium.org omrilio@chromium.org
Ah, thanks for the explanation. Sounds like we need a better async request system, so when thumbnail requests are sent from the gallery, the cache detects that a request for that image is already in-progress and notifies both callers once the generation has finished.

Can you confirm the priority of this weifang/omri? :)
This should be an edge case. I looped in Files as I was triaging the Gallery bugs since I know we have been investigating the image_loader, so wanted to keep this in mind. But no immediate fix needed.

Sign in to add a comment