Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(153)

Issue 1156003008: Decode ImageManager cached images on demand. (Closed)

Created:
5 years, 6 months ago by Dmitry Skiba
Modified:
5 years, 6 months ago
Reviewers:
Mathieu, stuartmorgan, Sami
CC:
chromium-reviews, Sami (do not use)
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Decode ImageManager cached images on demand. ImageManager was decoding and storing cached images during load, taking 1.27MiB for 6 NTP tiles in the Clank's case (6 * 296 * 188 * 4). Since NTP tiles are only requested when NTP page is created, it makes sense to decode them on demand and store encoded image data in the cache instead. BUG=493883 Committed: https://crrev.com/960b00e491d272f403dbf24980c0ea4528bc03d3 Cr-Commit-Position: refs/heads/master@{#334063}

Patch Set 1 #

Patch Set 2 : Fixed iOS build and unit test. #

Patch Set 3 : Include stddef to get size_t #

Total comments: 1

Patch Set 4 : Use TaskRunner #

Patch Set 5 : Fix WeakPtrFactory rule violation (ugh) #

Patch Set 6 : Add MessageLoop to avoid crashing in ThreadTaskRunnerHandle::Get() #

Patch Set 7 : Fix iOS build; run 'git cl format' #

Total comments: 2

Patch Set 8 : Fix iOS build again #

Patch Set 9 : Don't use MessageLoop API #

Unified diffs Side-by-side diffs Delta from patch set Stats (+111 lines, -66 lines) Patch
M chrome/browser/search/suggestions/suggestions_service_factory.cc View 1 2 3 1 chunk +3 lines, -1 line 0 comments Download
M components/suggestions/image_encoder.h View 1 2 2 chunks +7 lines, -1 line 0 comments Download
M components/suggestions/image_encoder.cc View 1 2 3 4 5 6 1 chunk +3 lines, -2 lines 0 comments Download
M components/suggestions/image_encoder_ios.mm View 1 1 chunk +3 lines, -5 lines 0 comments Download
M components/suggestions/image_manager.h View 1 2 3 4 5 6 5 chunks +15 lines, -8 lines 0 comments Download
M components/suggestions/image_manager.cc View 1 2 3 4 5 6 3 chunks +67 lines, -43 lines 0 comments Download
M components/suggestions/image_manager_unittest.cc View 1 2 3 4 5 6 4 chunks +10 lines, -4 lines 0 comments Download
M ios/chrome/browser/suggestions/suggestions_service_factory.mm View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -2 lines 0 comments Download

Messages

Total messages: 24 (8 generated)
Dmitry Skiba
5 years, 6 months ago (2015-06-03 23:07:04 UTC) #2
jam
https://codereview.chromium.org/1156003008/diff/30008/components/suggestions/image_manager.cc File components/suggestions/image_manager.cc (right): https://codereview.chromium.org/1156003008/diff/30008/components/suggestions/image_manager.cc#newcode136 components/suggestions/image_manager.cc:136: content::BrowserThread::PostTaskAndReplyWithResult( instead of adding a dependency on content just ...
5 years, 6 months ago (2015-06-04 16:04:30 UTC) #3
Dmitry Skiba
Done. On 2015/06/04 16:04:30, jam wrote: > https://codereview.chromium.org/1156003008/diff/30008/components/suggestions/image_manager.cc > File components/suggestions/image_manager.cc (right): > > https://codereview.chromium.org/1156003008/diff/30008/components/suggestions/image_manager.cc#newcode136 ...
5 years, 6 months ago (2015-06-04 19:59:44 UTC) #4
jam
On 2015/06/04 19:59:44, Dmitry Skiba wrote: > Done. thanks. I think you don't need my ...
5 years, 6 months ago (2015-06-04 22:17:43 UTC) #5
Dmitry Skiba
On 2015/06/04 22:17:43, jam wrote: > On 2015/06/04 19:59:44, Dmitry Skiba wrote: > > Done. ...
5 years, 6 months ago (2015-06-04 22:21:20 UTC) #6
Dmitry Skiba
5 years, 6 months ago (2015-06-04 22:21:43 UTC) #8
Mathieu
Hi Dmitry, sor
5 years, 6 months ago (2015-06-08 14:04:32 UTC) #9
Mathieu
On 2015/06/08 14:04:32, Mathieu Perreault wrote: > Hi Dmitry, sor sigh. I was going to ...
5 years, 6 months ago (2015-06-08 14:06:12 UTC) #10
Dmitry Skiba
On 2015/06/08 14:06:12, Mathieu Perreault wrote: > On 2015/06/08 14:04:32, Mathieu Perreault wrote: > > ...
5 years, 6 months ago (2015-06-09 15:14:14 UTC) #11
stuartmorgan
+skyostil https://codereview.chromium.org/1156003008/diff/110001/ios/chrome/browser/suggestions/suggestions_service_factory.mm File ios/chrome/browser/suggestions/suggestions_service_factory.mm (right): https://codereview.chromium.org/1156003008/diff/110001/ios/chrome/browser/suggestions/suggestions_service_factory.mm#newcode73 ios/chrome/browser/suggestions/suggestions_service_factory.mm:73: BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB))); This needs to use WebThread, not BrowserThread. ...
5 years, 6 months ago (2015-06-10 18:18:18 UTC) #13
Sami
https://codereview.chromium.org/1156003008/diff/110001/ios/chrome/browser/suggestions/suggestions_service_factory.mm File ios/chrome/browser/suggestions/suggestions_service_factory.mm (right): https://codereview.chromium.org/1156003008/diff/110001/ios/chrome/browser/suggestions/suggestions_service_factory.mm#newcode73 ios/chrome/browser/suggestions/suggestions_service_factory.mm:73: BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB))); On 2015/06/10 18:18:17, stuartmorgan wrote: > This needs ...
5 years, 6 months ago (2015-06-10 18:40:16 UTC) #15
Dmitry Skiba
Verified with stuartmorgan@ and justincohen@ that this change doesn't break Bling.
5 years, 6 months ago (2015-06-11 22:01:17 UTC) #19
Dmitry Skiba
On 2015/06/10 18:40:16, Sami wrote: > https://codereview.chromium.org/1156003008/diff/110001/ios/chrome/browser/suggestions/suggestions_service_factory.mm > File ios/chrome/browser/suggestions/suggestions_service_factory.mm (right): > > https://codereview.chromium.org/1156003008/diff/110001/ios/chrome/browser/suggestions/suggestions_service_factory.mm#newcode73 > ...
5 years, 6 months ago (2015-06-11 22:02:14 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1156003008/150001
5 years, 6 months ago (2015-06-11 22:38:05 UTC) #22
commit-bot: I haz the power
Committed patchset #9 (id:150001)
5 years, 6 months ago (2015-06-11 22:44:56 UTC) #23
commit-bot: I haz the power
5 years, 6 months ago (2015-06-11 22:45:53 UTC) #24
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/960b00e491d272f403dbf24980c0ea4528bc03d3
Cr-Commit-Position: refs/heads/master@{#334063}

Powered by Google App Engine
This is Rietveld 408576698