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

Issue 21646004: Compressed activity log database storage (Closed)

Created:
7 years, 4 months ago by mvrable
Modified:
7 years, 4 months ago
Reviewers:
felt
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org
Base URL:
http://git.chromium.org/chromium/src.git@refactor-cleanups
Visibility:
Public.

Description

Compressed activity log database storage Initial draft of a policy that should reduce activity log storage requirements. We do a few things: - Strip out arguments in many cases (like before) - When storing identical rows for the same day, simply increment a row count and track the time of the latest occurrence - Move strings to separate tables and just use id numbers in the log table, so that we're not storing repeated strings many times over The last optimization also removes the need for maintaining a table of API names in the source code for compression. BUG=238256 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=216424

Patch Set 1 #

Total comments: 4

Patch Set 2 : Second draft of patch #

Patch Set 3 : Rebase #

Patch Set 4 : Code cleanup #

Patch Set 5 : Compile fix: mark destructor virtual #

Patch Set 6 : Make expiration time configurable #

Patch Set 7 : Factor out dropping of obsolete tables and use in all policies #

Total comments: 21

Patch Set 8 : Fixes/cleanups from review feedback #

Patch Set 9 : Add tests; rename database_interned_string #

Patch Set 10 : Delete a debugging log message #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1477 lines, -789 lines) Patch
M chrome/browser/extensions/activity_log/activity_actions.h View 1 2 3 4 5 6 7 1 chunk +9 lines, -1 line 0 comments Download
M chrome/browser/extensions/activity_log/activity_actions.cc View 1 2 3 4 5 6 7 4 chunks +26 lines, -59 lines 0 comments Download
M chrome/browser/extensions/activity_log/activity_database.h View 1 4 chunks +15 lines, -6 lines 0 comments Download
M chrome/browser/extensions/activity_log/activity_database.cc View 1 1 chunk +4 lines, -2 lines 0 comments Download
M chrome/browser/extensions/activity_log/activity_database_unittest.cc View 1 3 chunks +24 lines, -2 lines 0 comments Download
M chrome/browser/extensions/activity_log/activity_log.cc View 1 2 3 chunks +5 lines, -4 lines 0 comments Download
M chrome/browser/extensions/activity_log/activity_log_policy.h View 1 2 3 4 5 6 7 4 chunks +48 lines, -18 lines 0 comments Download
M chrome/browser/extensions/activity_log/activity_log_policy.cc View 1 2 3 4 5 6 7 4 chunks +124 lines, -5 lines 0 comments Download
A chrome/browser/extensions/activity_log/activity_log_policy_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +102 lines, -0 lines 0 comments Download
M chrome/browser/extensions/activity_log/activity_log_unittest.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
D chrome/browser/extensions/activity_log/api_name_constants.h View 1 1 chunk +0 lines, -214 lines 0 comments Download
A chrome/browser/extensions/activity_log/counting_policy.h View 1 2 3 4 5 6 7 8 1 chunk +100 lines, -0 lines 0 comments Download
A chrome/browser/extensions/activity_log/counting_policy.cc View 1 2 3 4 5 6 7 8 9 1 chunk +505 lines, -0 lines 0 comments Download
A + chrome/browser/extensions/activity_log/counting_policy_unittest.cc View 1 2 3 4 5 6 7 13 chunks +151 lines, -82 lines 0 comments Download
A chrome/browser/extensions/activity_log/database_string_table.h View 1 2 3 4 5 6 7 8 1 chunk +71 lines, -0 lines 0 comments Download
A chrome/browser/extensions/activity_log/database_string_table.cc View 1 2 3 4 5 6 7 8 1 chunk +103 lines, -0 lines 0 comments Download
A chrome/browser/extensions/activity_log/database_string_table_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +133 lines, -0 lines 0 comments Download
M chrome/browser/extensions/activity_log/fullstream_ui_policy.h View 1 3 chunks +7 lines, -5 lines 0 comments Download
M chrome/browser/extensions/activity_log/fullstream_ui_policy.cc View 1 2 3 4 5 6 7 10 chunks +23 lines, -100 lines 0 comments Download
M chrome/browser/extensions/activity_log/fullstream_ui_policy_unittest.cc View 1 2 3 4 5 6 7 5 chunks +19 lines, -16 lines 0 comments Download
D chrome/browser/extensions/activity_log/stream_noargs_ui_policy.h View 1 2 1 chunk +0 lines, -34 lines 0 comments Download
D chrome/browser/extensions/activity_log/stream_noargs_ui_policy.cc View 1 2 1 chunk +0 lines, -63 lines 0 comments Download
D chrome/browser/extensions/activity_log/stream_noargs_ui_policy_unittest.cc View 1 2 1 chunk +0 lines, -173 lines 0 comments Download
M chrome/chrome_browser_extensions.gypi View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -3 lines 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -1 line 0 comments Download

Messages

Total messages: 17 (0 generated)
mvrable
This isn't ready for review quite yet, but I'm sending out an early version of ...
7 years, 4 months ago (2013-08-02 05:18:13 UTC) #1
felt
> In terms of database size, right now we're still dominated by the large argument ...
7 years, 4 months ago (2013-08-02 13:56:53 UTC) #2
felt
> Something feedback would be good on: do we want to use the same database ...
7 years, 4 months ago (2013-08-02 14:04:19 UTC) #3
mvrable
On 2013/08/02 14:04:19, felt wrote: > How would setting the count to 1 complicate writing ...
7 years, 4 months ago (2013-08-02 14:24:27 UTC) #4
felt
On 2013/08/02 14:24:27, mvrable wrote: > On 2013/08/02 14:04:19, felt wrote: > > How would ...
7 years, 4 months ago (2013-08-02 16:24:59 UTC) #5
felt
https://codereview.chromium.org/21646004/diff/1/chrome/browser/extensions/activity_log/counting_policy.h File chrome/browser/extensions/activity_log/counting_policy.h (right): https://codereview.chromium.org/21646004/diff/1/chrome/browser/extensions/activity_log/counting_policy.h#newcode16 chrome/browser/extensions/activity_log/counting_policy.h:16: class CountingPolicy : public StreamWithoutArgsUIPolicy { Is there a ...
7 years, 4 months ago (2013-08-02 16:36:28 UTC) #6
mvrable
https://codereview.chromium.org/21646004/diff/1/chrome/browser/extensions/activity_log/counting_policy.h File chrome/browser/extensions/activity_log/counting_policy.h (right): https://codereview.chromium.org/21646004/diff/1/chrome/browser/extensions/activity_log/counting_policy.h#newcode16 chrome/browser/extensions/activity_log/counting_policy.h:16: class CountingPolicy : public StreamWithoutArgsUIPolicy { On 2013/08/02 16:36:28, ...
7 years, 4 months ago (2013-08-02 17:16:58 UTC) #7
mvrable
Here's a second iteration of the patch. Some changes: - The policies are now independent ...
7 years, 4 months ago (2013-08-02 21:31:13 UTC) #8
mvrable
Would you have a chance to start doing a more serious review of this code ...
7 years, 4 months ago (2013-08-05 22:29:55 UTC) #9
felt
Hi Michael, a few questions. https://codereview.chromium.org/21646004/diff/44001/chrome/browser/extensions/activity_log/activity_log_policy.cc File chrome/browser/extensions/activity_log/activity_log_policy.cc (right): https://codereview.chromium.org/21646004/diff/44001/chrome/browser/extensions/activity_log/activity_log_policy.cc#newcode73 chrome/browser/extensions/activity_log/activity_log_policy.cc:73: void ActivityLogPolicy::Util::SanitizeAction(scoped_refptr<Action> action) { ...
7 years, 4 months ago (2013-08-07 01:09:42 UTC) #10
mvrable
Thanks for the review! I made some cleanups, and I also deleted the used of ...
7 years, 4 months ago (2013-08-07 17:01:19 UTC) #11
mvrable
Also, I'm considering renaming database_interned_string.cc to database_interned_string.cc to match the name of the class (I ...
7 years, 4 months ago (2013-08-07 17:39:05 UTC) #12
mvrable
I added some additional tests (not entirely comprehensive but I'm hoping they cover the important ...
7 years, 4 months ago (2013-08-07 18:49:46 UTC) #13
felt
On 2013/08/07 18:49:46, mvrable wrote: > I added some additional tests (not entirely comprehensive but ...
7 years, 4 months ago (2013-08-08 02:08:35 UTC) #14
felt
https://codereview.chromium.org/21646004/diff/44001/chrome/browser/extensions/activity_log/activity_log_policy.h File chrome/browser/extensions/activity_log/activity_log_policy.h (right): https://codereview.chromium.org/21646004/diff/44001/chrome/browser/extensions/activity_log/activity_log_policy.h#newcode108 chrome/browser/extensions/activity_log/activity_log_policy.h:108: static void SanitizeAction(scoped_refptr<Action> action); On 2013/08/07 17:01:19, mvrable wrote: ...
7 years, 4 months ago (2013-08-08 02:08:50 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mvrable@chromium.org/21646004/82001
7 years, 4 months ago (2013-08-08 10:19:09 UTC) #16
commit-bot: I haz the power
7 years, 4 months ago (2013-08-08 19:39:07 UTC) #17
Message was sent while issue was closed.
Change committed as 216424

Powered by Google App Engine
This is Rietveld 408576698