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

Issue 16776004: Replace FTS in the history_service with a brute force text search. (Closed)

Created:
7 years, 6 months ago by rmcilroy
Modified:
7 years, 6 months ago
CC:
chromium-reviews, browser-components-watch_chromium.org, Scott Hess - ex-Googler
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Replace FTS in the history_service with a brute force text search. The only remaining user of the text_database full-text-search (FTS) is the chrome://history page. The FTS database's index files are large, causing storage and overhead problems. This change replaces the history pages search to use a brute force search over URLs and titles in the History DB (which is small enough that this gives acceptable performance). A follow up CL will remove all of the unused FTS and text_database code. BUG=247417 TEST=Tested searches in history page using a number of different character sets. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=208068

Patch Set 1 #

Patch Set 2 : Fix kSafeRegexWordBoundary for Korean. #

Total comments: 2

Patch Set 3 : Replace regexps with query_parser based matching. #

Patch Set 4 : Fix some typos #

Total comments: 8

Patch Set 5 : Address scotts comments & fix unit tests. #

Total comments: 6

Patch Set 6 : Address Brett's comments. #

Total comments: 12
Unified diffs Side-by-side diffs Delta from patch set Stats (+294 lines, -109 lines) Patch
M chrome/browser/history/history_backend.h View 1 2 3 4 5 1 chunk +9 lines, -3 lines 0 comments Download
M chrome/browser/history/history_backend.cc View 1 2 3 4 5 2 chunks +45 lines, -2 lines 3 comments Download
M chrome/browser/history/history_querying_unittest.cc View 1 2 3 4 11 chunks +43 lines, -65 lines 9 comments Download
M chrome/browser/history/history_types.h View 1 2 3 2 chunks +3 lines, -0 lines 0 comments Download
M chrome/browser/history/history_types.cc View 1 2 3 2 chunks +9 lines, -0 lines 0 comments Download
M chrome/browser/history/query_parser.h View 1 2 2 chunks +11 lines, -3 lines 0 comments Download
M chrome/browser/history/query_parser.cc View 1 2 9 chunks +61 lines, -7 lines 0 comments Download
M chrome/browser/history/url_database.h View 4 chunks +10 lines, -1 line 0 comments Download
M chrome/browser/history/url_database.cc View 1 2 3 4 1 chunk +26 lines, -0 lines 0 comments Download
M chrome/browser/history/visit_database.h View 1 2 3 4 5 3 chunks +18 lines, -1 line 0 comments Download
M chrome/browser/history/visit_database.cc View 1 2 3 4 5 3 chunks +59 lines, -27 lines 0 comments Download

Messages

Total messages: 20 (0 generated)
rmcilroy
There is still a couple of tests I need to fix up before submitting this, ...
7 years, 6 months ago (2013-06-11 16:37:18 UTC) #1
Scott Hess - ex-Googler
IMHO constructing a query full of REGEXP to use SQLite like this is nasty. SQLite ...
7 years, 6 months ago (2013-06-12 17:38:34 UTC) #2
rmcilroy
Thanks for the comments Scott, I agree that the regexp was ugly. Changed to use ...
7 years, 6 months ago (2013-06-13 15:32:05 UTC) #3
Scott Hess - ex-Googler
I think this looks a lot cleaner, at least in the areas where I feel ...
7 years, 6 months ago (2013-06-13 19:45:58 UTC) #4
rmcilroy
Addressed your comments and also fixed the unit_tests. This also involved a couple of modifications ...
7 years, 6 months ago (2013-06-14 12:45:41 UTC) #5
rmcilroy
Ping? Brett, do you have any suggestions for this CL?
7 years, 6 months ago (2013-06-17 14:13:14 UTC) #6
brettw
https://codereview.chromium.org/16776004/diff/13001/chrome/browser/history/history_backend.cc File chrome/browser/history/history_backend.cc (right): https://codereview.chromium.org/16776004/diff/13001/chrome/browser/history/history_backend.cc#newcode1117 chrome/browser/history/history_backend.cc:1117: bool HistoryBackend::GetVisitsForURLWithOptions(URLID id, I don't get why this is ...
7 years, 6 months ago (2013-06-18 23:26:28 UTC) #7
rmcilroy
Thanks for the comments Brett - hopefully they are all addressed. https://codereview.chromium.org/16776004/diff/13001/chrome/browser/history/history_backend.cc File chrome/browser/history/history_backend.cc (right): ...
7 years, 6 months ago (2013-06-19 10:30:14 UTC) #8
rmcilroy
On 2013/06/19 10:30:14, Ross Mcilroy wrote: > Thanks for the comments Brett - hopefully they ...
7 years, 6 months ago (2013-06-20 09:54:25 UTC) #9
Scott Hess - ex-Googler
overall lgtm, but Brett probably can speak better to whether it's wired into things appropriately. ...
7 years, 6 months ago (2013-06-20 19:50:21 UTC) #10
rmcilroy
https://chromiumcodereview.appspot.com/16776004/diff/24001/chrome/browser/history/history_backend.cc File chrome/browser/history/history_backend.cc (right): https://chromiumcodereview.appspot.com/16776004/diff/24001/chrome/browser/history/history_backend.cc#newcode1438 chrome/browser/history/history_backend.cc:1438: QueryResults* result) { On 2013/06/20 19:50:22, shess wrote: > ...
7 years, 6 months ago (2013-06-20 21:48:08 UTC) #11
Scott Hess - ex-Googler
You have defused all of my nits, so still LGTM, but with low confidence. Brett ...
7 years, 6 months ago (2013-06-20 22:18:31 UTC) #12
brettw
Owners LGTM, I didn't delve into the detailed matching logic.
7 years, 6 months ago (2013-06-21 19:41:35 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rmcilroy@chromium.org/16776004/24001
7 years, 6 months ago (2013-06-22 01:46:29 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rmcilroy@chromium.org/16776004/24001
7 years, 6 months ago (2013-06-22 02:30:01 UTC) #15
commit-bot: I haz the power
Retried try job too often on linux_rel for step(s) base_unittests, browser_tests, cacheinvalidation_unittests, cc_unittests, check_deps, chromedriver2_unittests, ...
7 years, 6 months ago (2013-06-22 03:18:58 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rmcilroy@chromium.org/16776004/24001
7 years, 6 months ago (2013-06-22 13:47:48 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rmcilroy@chromium.org/16776004/24001
7 years, 6 months ago (2013-06-22 14:34:08 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rmcilroy@chromium.org/16776004/24001
7 years, 6 months ago (2013-06-22 15:03:17 UTC) #19
commit-bot: I haz the power
7 years, 6 months ago (2013-06-22 16:59:29 UTC) #20
Message was sent while issue was closed.
Change committed as 208068

Powered by Google App Engine
This is Rietveld 408576698