New issue
Advanced search Search tips

Issue 883565 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

CrOS File Manager #Metadata retains the (probably useless) EXIF image buffer when opening a photo

Project Member Reported by tapted@chromium.org, Sep 13

Issue description

Chrome Version       : 70.0.3538.7

The EXIF header in a photo can hold a thumbnail, so gets pretty big (like, ~200kB per file). It looks like the metadata holding the image is loaded into an array while it is parsed, and that array is never dereferenced when parsing is complete.

EXIF thumbnails are typically compressed by a camera; poor quality, and of a fixed size that is customised to the UI on a digital camera's and generally not useful. At best they could provide an "early" thumbnail without having to read the entire file, but we'd always want to upgrade that thumbnail quality, and store that in the cache rather than re-store a low-quality exif thumbnail.

It's retained in the

   /**
   * "Image File Directory" obtained from EXIF header.
   * @public {!Object|undefined}
   */
  this.ifd;

property of MetadataItem (note it's actually not `Object`, but MetadataCacheItemProperty, holding {value: {exif:Object, thumbnail:Object, image:Object}} )

I think once |thumbnailUrl| or |croppedThumbnailUrl| is updated on the MetadataItem, |ifd| should be set to null. Or something like that.

This |ifd| member seems to account for about 90% of the ~125MB being used in my MetadataModel.cache_.items_[i].ifd
 
Screenshot 2018-09-13 at 10.13.33.png
552 KB View Download

Sign in to add a comment