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

Issue 175697 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Feb 2013
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug

Blocking:
issue 176216



Sign in to add a comment

Introduce image loader extension.

Project Member Reported by mtomasz@chromium.org, Feb 12 2013

Issue description

Currently, we load images and copy from <image> to <canvas> in the Files.app's thread. As a result, ui freezes from time to time for up to 300 ms for large images, since canvas.drawImage is synchronous.

To overcome this, a workaround is implemented by delaying animations for some period of time and starting them until the image is copied. This approach often doesn't work and also makes code very complicated.

We should write a simple extension (separate thread) which would load images, copy to canvas, optionally resize and then send back to Files.app canvas data.

As a result, loading images from Files.app point of view would become completely asynchronous, and ui should never freeze.
 
Blocking: chromium:176216
Project Member

Comment 3 by bugdroid1@chromium.org, Feb 22 2013

The following revision refers to this bug:
    http://src.chromium.org/viewvc/chrome?view=rev&revision=184088

------------------------------------------------------------------------
r184088 | mtomasz@chromium.org | 2013-02-22T11:17:25.741948Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/resources/file_manager/css/photo_import.css?r1=184088&r2=184087&pathrev=184088
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/resources/file_manager/gallery.html?r1=184088&r2=184087&pathrev=184088
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/resources/file_manager/js/photo/photo_import.js?r1=184088&r2=184087&pathrev=184088
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/resources/file_manager/js/util.js?r1=184088&r2=184087&pathrev=184088
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/browser_resources.grd?r1=184088&r2=184087&pathrev=184088
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/resources/file_manager/js/photo/photo_import_scripts.js?r1=184088&r2=184087&pathrev=184088
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/resources/file_manager/js/file_selection.js?r1=184088&r2=184087&pathrev=184088
   M http://src.chromium.org/viewvc/chrome/trunk/src/build/common.gypi?r1=184088&r2=184087&pathrev=184088
   A http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/resources/image_loader/manifest.json?r1=184088&r2=184087&pathrev=184088
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/resources/file_manager/js/action_choice.js?r1=184088&r2=184087&pathrev=184088
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/resources/file_manager/js/media/media_util.js?r1=184088&r2=184087&pathrev=184088
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/resources/file_manager/js/main_scripts.js?r1=184088&r2=184087&pathrev=184088
   A http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/resources/image_loader/image_loader.js?r1=184088&r2=184087&pathrev=184088
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/resources/file_manager/photo_import.html?r1=184088&r2=184087&pathrev=184088
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/resources/file_manager/js/photo/gallery_scripts.js?r1=184088&r2=184087&pathrev=184088
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/resources/file_manager/main.html?r1=184088&r2=184087&pathrev=184088
   A http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/resources/image_loader/client.js?r1=184088&r2=184087&pathrev=184088
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/extensions/component_loader.cc?r1=184088&r2=184087&pathrev=184088
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/extensions/component_loader.h?r1=184088&r2=184087&pathrev=184088
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/resources/component_extension_resources.grd?r1=184088&r2=184087&pathrev=184088
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/resources/file_manager/js/photo/ribbon.js?r1=184088&r2=184087&pathrev=184088
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/chrome_switches.cc?r1=184088&r2=184087&pathrev=184088
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/chrome_switches.h?r1=184088&r2=184087&pathrev=184088
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/resources/file_manager/js/image_editor/image_util.js?r1=184088&r2=184087&pathrev=184088
   A http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/resources/image_loader?r1=184088&r2=184087&pathrev=184088

Introduce Image loader extension.

Files.app's ui used to be unresponsive, when displaying large images. This was caused because of contex.drawImage() synchronous
call on the UI thread, which takes sometimes even 300 ms per one picture. In case of loading more images it causes ui freezes.

This patch solves this issue by introducing an image loader extension, which loads and resizes images asynchronously.
With this fix, we will be able to enable mosaic view on each volume, not only on Drive.

TEST=Check thumbnails in Files.app, including photo importer and gallery.
BUG= 175697 ,  176237 ,  168035 

Review URL: https://chromiumcodereview.appspot.com/12304013
------------------------------------------------------------------------
Status: Fixed
Project Member

Comment 5 by bugdroid1@chromium.org, Feb 26 2013

Project: chromiumos/third_party/autotest
Branch : master
Author : Jim Hebert <jimhebert@chromium.org>
Commit : d5c571528e603a6244ae87f7a7352c57abc21176

Code Review +2: Jorge Lucangeli Obes
Verified    +1: Jim Hebert
Change-Id     : I842becbe29c99687c678614ee485a09afaa5747b
Reviewed-at   : https://gerrit.chromium.org/gerrit/43994

Add Image Loader to expected extensions

BUG= chromium:175697 
TEST=security_BundledExtensions passes on ToT/x86-zgb

Commit-Queue: Jim Hebert <jimhebert@chromium.org>

M  client/site_tests/security_BundledExtensions/baseline
Cc: kaznacheev@chromium.org
 Issue 151832  has been merged into this issue.
Project Member

Comment 7 by bugdroid1@chromium.org, Mar 10 2013

Labels: -Area-UI -Feature-FileManager -Mstone-27 Cr-Platform-Apps-FileManager Cr-UI M-27

Sign in to add a comment