Gallery app can't generate thumbnails before Files app |
||||||
Issue descriptionChrome 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?
,
Mar 2 2016
,
Mar 10 2016
,
Jun 7 2018
,
Jun 8 2018
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.
,
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.
,
Jun 8 2018
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.
,
Jun 12 2018
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? :)
,
Jun 12 2018
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 |
||||||
Comment 1 by ryoh@chromium.org
, Mar 2 2016