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

Issue 7696017: Cache the ranges_ vector and share the ranges_ vector (Closed)

Created:
9 years, 4 months ago by ramant (doing other things)
Modified:
9 years, 2 months ago
CC:
chromium-reviews, brettw-cc_chromium.org
Visibility:
Public.

Description

Cache the ranges_ vector and share the ranges_ vector across histograms if the ranges in the ranges_ vector is same. This change saves around 100k of memory in the browser (around 400 histograms sharing the same ranges_ vector and each ranges_ vector has around 50 elements). In each renderer process we are sharing ranges_ vector for around 30 histograms (a savings of 6k of memory). R=jar TEST=histogram unit tests. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=106425

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : '' #

Patch Set 7 : '' #

Patch Set 8 : '' #

Total comments: 16

Patch Set 9 : '' #

Total comments: 2

Patch Set 10 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+266 lines, -32 lines) Patch
M base/metrics/histogram.h View 1 2 3 4 5 6 7 8 9 14 chunks +77 lines, -10 lines 0 comments Download
M base/metrics/histogram.cc View 1 2 3 4 5 6 7 8 9 12 chunks +148 lines, -15 lines 0 comments Download
M base/metrics/histogram_unittest.cc View 1 2 3 4 5 6 7 8 9 2 chunks +32 lines, -6 lines 0 comments Download
M chrome/browser/browser_about_handler.cc View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/metrics/metrics_service.cc View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/renderer/renderer_histogram_snapshots.cc View 1 2 3 4 5 6 7 8 9 2 chunks +3 lines, -1 line 0 comments Download

Messages

Total messages: 6 (0 generated)
ramant (doing other things)
Hi Jim, Would appreciate if you could look at this CL (this is my first ...
9 years, 4 months ago (2011-08-24 17:30:01 UTC) #1
jar (doing other things)
Mostly nits below. http://codereview.chromium.org/7696017/diff/7011/base/metrics/histogram.cc File base/metrics/histogram.cc (right): http://codereview.chromium.org/7696017/diff/7011/base/metrics/histogram.cc#newcode1036 base/metrics/histogram.cc:1036: delete ranges; I'd suggest we explicity ...
9 years, 2 months ago (2011-10-04 22:32:38 UTC) #2
ramant (doing other things)
Hi Jim, Made all the changes you have suggested. Would appreciate if you could take ...
9 years, 2 months ago (2011-10-19 01:09:52 UTC) #3
jar (doing other things)
One nit below. Also... There is a small chance that this will induce memory leaks ...
9 years, 2 months ago (2011-10-19 23:33:03 UTC) #4
ramant (doing other things)
Fixed the comment. Thanks much Jim, raman http://codereview.chromium.org/7696017/diff/12001/base/metrics/histogram.h File base/metrics/histogram.h (right): http://codereview.chromium.org/7696017/diff/12001/base/metrics/histogram.h#newcode862 base/metrics/histogram.h:862: // A ...
9 years, 2 months ago (2011-10-20 00:11:35 UTC) #5
commit-bot: I haz the power
9 years, 2 months ago (2011-10-20 00:12:40 UTC) #6

Powered by Google App Engine
This is Rietveld 408576698