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

Issue 8349018: Safe-browsing SBAddPrefix from vector to deque. (Closed)

Created:
9 years, 2 months ago by Scott Hess - ex-Googler
Modified:
9 years, 1 month ago
CC:
chromium-reviews, Paweł Hajdan Jr.
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Safe-browsing SBAddPrefix from vector to deque. During updates, a large vector of SBAddPrefix is used to make things more efficient. This may also be leading to memory fragmentation, because the vector for most users will be around 5MB. This converts std::vector<SBAddPrefix> uses to std::deque<SBAddPrefix>. SBAddPrefixContainer is used to make this indirect. The major bits of this are: - safe_browsing_store.cc helper functions templated on abstract containers rather than vectors of abstract items. - safe_browsing_store_file.cc I/O functions generalized to abstract containers rather than vectors of abstract items. [It also works for sets!] - Convert appropriate cases of iteration-by-index to iterators. Also revert the following two debuggin changes: r104974: Histogram large realloc in safe-browsing update. r105419: Precalculate total size for safe-browsing add_prefixes. BUG=99056 TEST=Tests, and monitor crash server. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=107415

Patch Set 1 #

Total comments: 14

Patch Set 2 : s/SBAddPrefixContainer/SBAddPrefixes/g #

Patch Set 3 : Tweak some naming. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+157 lines, -215 lines) Patch
M chrome/browser/safe_browsing/safe_browsing_database.cc View 1 7 chunks +16 lines, -13 lines 0 comments Download
M chrome/browser/safe_browsing/safe_browsing_store.h View 1 5 chunks +6 lines, -4 lines 0 comments Download
M chrome/browser/safe_browsing/safe_browsing_store.cc View 1 2 7 chunks +36 lines, -36 lines 0 comments Download
M chrome/browser/safe_browsing/safe_browsing_store_file.h View 1 6 chunks +5 lines, -9 lines 0 comments Download
M chrome/browser/safe_browsing/safe_browsing_store_file.cc View 1 2 20 chunks +84 lines, -143 lines 0 comments Download
M chrome/browser/safe_browsing/safe_browsing_store_file_unittest.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/safe_browsing/safe_browsing_store_unittest.cc View 1 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/safe_browsing/safe_browsing_store_unittest_helper.cc View 1 5 chunks +5 lines, -5 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
Scott Hess - ex-Googler
I tried to give a good description for consulting during the review. For the most ...
9 years, 2 months ago (2011-10-18 22:11:35 UTC) #1
Scott Hess - ex-Googler
I can't figure out the mac_valgrind failure. They're all in gl* and cg* functions (drawing ...
9 years, 2 months ago (2011-10-20 01:01:21 UTC) #2
Scott Hess - ex-Googler
On 2011/10/18 22:11:35, shess wrote: > I tried to give a good description for consulting ...
9 years, 2 months ago (2011-10-21 18:23:16 UTC) #3
jar (doing other things)
Mostly nits... but one real question. http://codereview.chromium.org/8349018/diff/1/chrome/browser/safe_browsing/safe_browsing_database.cc File chrome/browser/safe_browsing/safe_browsing_database.cc (right): http://codereview.chromium.org/8349018/diff/1/chrome/browser/safe_browsing/safe_browsing_database.cc#newcode1143 chrome/browser/safe_browsing/safe_browsing_database.cc:1143: SBAddPrefixContainer prefixes; Use ...
9 years, 2 months ago (2011-10-21 19:10:45 UTC) #4
Scott Hess - ex-Googler
This is just a quick high-level response, I'll circle back and make the SBAddPrefixes change ...
9 years, 2 months ago (2011-10-21 23:39:32 UTC) #5
Scott Hess - ex-Googler
Oops, turns out if you don't upload, nobody sees it. I tweaked some of the ...
9 years, 1 month ago (2011-10-25 19:54:12 UTC) #6
jar (doing other things)
The names are better... I still don't like them much... but perhaps it will "grow ...
9 years, 1 month ago (2011-10-25 21:57:24 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/shess@chromium.org/8349018/10001
9 years, 1 month ago (2011-10-26 18:32:10 UTC) #8
commit-bot: I haz the power
9 years, 1 month ago (2011-10-26 19:44:40 UTC) #9
Change committed as 107415

Powered by Google App Engine
This is Rietveld 408576698