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

Issue 6389001: Add heuristics to skip thumbnail generation when it's unnecessary. (Closed)

Created:
9 years, 11 months ago by satorux1
Modified:
9 years, 7 months ago
Reviewers:
brettw
CC:
chromium-reviews, brettw-cc_chromium.org, Paweł Hajdan Jr.
Visibility:
Public.

Description

Add heuristics to skip thumbnail generation when it's unnecessary. More specifically, skip thumbnail generation in the following occasions: - The browser is in the off-the-record mode. - The URL is not valid for top sites (ex. new tab pages, etc.) - The existing thumbnail is new and interesting enough. This patch should reduce the number of thumbnail generations significantly. BUG=65936 TEST=add unit tests. confirm that the thumbnails are updated as expected. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=72763

Patch Set 1 #

Patch Set 2 : Add tests #

Patch Set 3 : minor cleanup #

Total comments: 8

Patch Set 4 : address comments #

Patch Set 5 : fix debug unit tests #

Total comments: 3

Patch Set 6 : add comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+256 lines, -15 lines) Patch
M chrome/browser/history/top_sites.h View 1 2 3 3 chunks +18 lines, -2 lines 0 comments Download
M chrome/browser/history/top_sites.cc View 1 2 3 4 5 6 chunks +22 lines, -4 lines 0 comments Download
M chrome/browser/history/top_sites_cache.h View 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/history/top_sites_cache.cc View 1 chunk +11 lines, -0 lines 0 comments Download
M chrome/browser/tab_contents/thumbnail_generator.h View 1 2 chunks +10 lines, -0 lines 0 comments Download
M chrome/browser/tab_contents/thumbnail_generator.cc View 1 2 3 2 chunks +29 lines, -9 lines 0 comments Download
M chrome/browser/tab_contents/thumbnail_generator_unittest.cc View 1 2 3 4 2 chunks +99 lines, -0 lines 0 comments Download
M chrome/common/thumbnail_score.h View 1 2 3 4 chunks +13 lines, -0 lines 0 comments Download
M chrome/common/thumbnail_score.cc View 1 2 3 3 chunks +26 lines, -0 lines 0 comments Download
M chrome/common/thumbnail_score_unittest.cc View 1 2 3 1 chunk +24 lines, -0 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
satorux1
9 years, 11 months ago (2011-01-24 12:15:24 UTC) #1
satorux1
Today, I'm going to use my local chromium build as the primary browser, with both ...
9 years, 11 months ago (2011-01-25 01:56:27 UTC) #2
satorux1
Friendly ping. BTW, the result of the experiment was posted to http://code.google.com/p/chromium/issues/detail?id=65936#c5
9 years, 11 months ago (2011-01-26 00:32:06 UTC) #3
brettw
LGTM, thanks! http://codereview.chromium.org/6389001/diff/4001/chrome/browser/history/top_sites.h File chrome/browser/history/top_sites.h (right): http://codereview.chromium.org/6389001/diff/4001/chrome/browser/history/top_sites.h#newcode153 chrome/browser/history/top_sites.h:153: virtual bool IsKnownURL(const GURL& url); Both IsKnownURL ...
9 years, 11 months ago (2011-01-26 05:55:20 UTC) #4
satorux1
http://codereview.chromium.org/6389001/diff/4001/chrome/browser/history/top_sites.h File chrome/browser/history/top_sites.h (right): http://codereview.chromium.org/6389001/diff/4001/chrome/browser/history/top_sites.h#newcode153 chrome/browser/history/top_sites.h:153: virtual bool IsKnownURL(const GURL& url); On 2011/01/26 05:55:20, brettw ...
9 years, 11 months ago (2011-01-26 08:14:46 UTC) #5
satorux1
Turned out that the unit test for ThumbnailGenerator::ShouldUpdateThumbnail() crashed in TopSitesBackend::~TopSitesBackend() with Debug build. Hence ...
9 years, 11 months ago (2011-01-26 10:53:59 UTC) #6
brettw
LGTM http://codereview.chromium.org/6389001/diff/16001/chrome/browser/history/top_sites.cc File chrome/browser/history/top_sites.cc (right): http://codereview.chromium.org/6389001/diff/16001/chrome/browser/history/top_sites.cc#newcode157 chrome/browser/history/top_sites.cc:157: backend_ = new TopSitesBackend; Can you add a ...
9 years, 11 months ago (2011-01-26 16:40:32 UTC) #7
satorux1
9 years, 11 months ago (2011-01-27 02:02:11 UTC) #8
http://codereview.chromium.org/6389001/diff/16001/chrome/browser/history/top_...
File chrome/browser/history/top_sites.cc (right):

http://codereview.chromium.org/6389001/diff/16001/chrome/browser/history/top_...
chrome/browser/history/top_sites.cc:157: backend_ = new TopSitesBackend;
On 2011/01/26 16:40:32, brettw wrote:
> Can you add a comment why it's here rather than in the constructor?

Good point. Added a comment.

Powered by Google App Engine
This is Rietveld 408576698