forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Download home v2: Increase thumbnail cache size.
On Android we use an in-memory thumbnail cache to improve view recycling performance and use a disk cache to avoid costly backend operations like decoding images, videos etc. For download home v2, the thumbnail size is much larger than the old download home, thus we need to tweak the size of cache. 90% percentile of users have around 15 media thumbnails. The size of bitmap varies from under 1MB to around 5MB. The disk cache uses PNG to compress, the compression rate is around 1/3. This CL does the following: 1. The size of the thumbnail for high dpi devices are scaled down to mdpi, which can save memory/disk. 2. For in-memory cache size, download home v2 uses 15MB for high end devices. In-memory cache size is now passed in from owner of ThumbnailProviderImpl. 3. Disk cache size is increased. This should be shared by multiple owners of ThumbnailProviderImpl, or the owner with smaller disk cache size may remove files unexpectedly used by other owners. Bug: 87292 Change-Id: If7cb700a60a8d119bca136b1a7d1fe7feb787d8b Reviewed-on: https://chromium-review.googlesource.com/c/1296546 Commit-Queue: Xing Liu <xingliu@chromium.org> Reviewed-by: David Trainor <dtrainor@chromium.org> Reviewed-by: Shakti Sahu <shaktisahu@chromium.org> Cr-Commit-Position: refs/heads/master@{#602957}
- Loading branch information
Xing Liu
authored and
Commit Bot
committed
Oct 26, 2018
1 parent
dfd6942
commit b859fdb
Showing
6 changed files
with
97 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters